diff --git a/.gitignore b/.gitignore
index f3b4d13bd556fd90a1a15547b280408ff3585895..85e0cbb758644a0a7930fbecd7b85fcc86dd4bc5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,3 +66,7 @@ dump.rdb
 
 #Rubinius's JIT
 *.rbc
+
+# Ignore precompiled assets
+# Heroku or Capistrano can and should regenerate them on every deploy
+public/assets
diff --git a/Gemfile b/Gemfile
index 365f97502685aef82d319989b01242f8f02f5573..118464a7df978f5c7ee6406aa4827c338c7e87d4 100644
--- a/Gemfile
+++ b/Gemfile
@@ -64,8 +64,6 @@ gem 'fastercsv', '1.5.4', :require => false
 gem 'mini_magick', '3.4'
 gem 'rest-client', '1.6.7'
 
-gem 'jammit-s3'
-
 # JSON and API
 
 gem 'json'
@@ -113,6 +111,7 @@ group :assets do
   gem 'sass-rails'
   gem 'uglifier'
 end
+gem 'handlebars_assets'
 
 gem 'jquery-rails'
 
diff --git a/Gemfile.lock b/Gemfile.lock
index a7ee25cdabd41ce85f002eefe6fec683d470796c..6b1ccc7359baa798480e1e34d7fd5c5df99a90b3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -37,10 +37,6 @@ GIT
 GEM
   remote: http://rubygems.org/
   specs:
-    POpen4 (0.1.4)
-      Platform (>= 0.4.0)
-      open4
-    Platform (0.4.0)
     SystemTimer (1.2.3)
     actionmailer (3.1.4)
       actionpack (= 3.1.4)
@@ -188,6 +184,10 @@ GEM
     gherkin (2.9.1)
       json (>= 1.4.6)
     haml (3.1.4)
+    handlebars_assets (0.4.1)
+      execjs (>= 1.2.9)
+      sprockets (>= 2.0.3)
+      tilt
     hashie (1.2.0)
     heroku (2.23.0)
       launchy (>= 0.3.2)
@@ -209,12 +209,6 @@ GEM
       actionpack (~> 3.0)
       i18n-inflector (~> 2.6)
       railties (~> 3.0)
-    jammit (0.6.5)
-      yui-compressor (>= 0.9.3)
-    jammit-s3 (0.6.0.2)
-      jammit (>= 0.5.4)
-      mimemagic (>= 0.1.7)
-      s3 (>= 0.3.7)
     jasmine (1.1.2)
       jasmine-core (>= 1.1.0)
       rack (>= 1.1)
@@ -245,7 +239,6 @@ GEM
       treetop (~> 1.4.8)
     messagebus_ruby_api (1.0.3)
     mime-types (1.18)
-    mimemagic (0.1.8)
     mini_magick (3.4)
       subexec (~> 0.2.1)
     mobile-fu (1.0.0)
@@ -295,14 +288,12 @@ GEM
       omniauth-oauth (~> 1.0)
     omniauth-twitter (0.0.8)
       omniauth-oauth (~> 1.0)
-    open4 (1.3.0)
     orm_adapter (0.0.6)
     parallel (0.5.16)
     parallel_tests (0.7.2)
       parallel
     pg (0.13.2)
     polyglot (0.3.3)
-    proxies (0.2.1)
     rack (1.3.6)
     rack-cache (1.2)
       rack (>= 0.4)
@@ -396,8 +387,6 @@ GEM
     ruby_core_source (0.1.5)
       archive-tar-minitar (>= 0.5.2)
     rubyzip (0.9.6.1)
-    s3 (0.3.11)
-      proxies (~> 0.2.0)
     sass (3.1.15)
     sass-rails (3.1.6)
       actionpack (~> 3.1.0)
@@ -460,8 +449,6 @@ GEM
     xpath (0.1.4)
       nokogiri (~> 1.3)
     yard (0.7.5)
-    yui-compressor (0.9.6)
-      POpen4 (>= 0.1.4)
 
 PLATFORMS
   ruby
@@ -497,11 +484,11 @@ DEPENDENCIES
   foreman (= 0.34.1)
   fuubar (= 0.0.6)
   haml
+  handlebars_assets
   heroku
   heroku_san
   http_accept_language (~> 1.0.2)
   i18n-inflector-rails (~> 1.0)
-  jammit-s3
   jasmine (~> 1.1.2)
   jquery-rails
   json
diff --git a/public/javascripts/app/app.js b/app/assets/javascripts/app/app.js
similarity index 84%
rename from public/javascripts/app/app.js
rename to app/assets/javascripts/app/app.js
index bf1320cc3051f7f12b4a809e426a451df118c86f..6804ca779e0efd9e083971837d12e479420e50c4 100644
--- a/public/javascripts/app/app.js
+++ b/app/assets/javascripts/app/app.js
@@ -1,3 +1,11 @@
+//= require_self
+//= require_tree ./helpers
+//= require ./router
+//= require ./views
+//= require_tree ./models
+//= require_tree ./pages
+//= require_tree ./collections
+//= require_tree ./views
 var app = {
   collections: {},
   models: {},
diff --git a/public/javascripts/app/collections/comments.js b/app/assets/javascripts/app/collections/comments.js
similarity index 100%
rename from public/javascripts/app/collections/comments.js
rename to app/assets/javascripts/app/collections/comments.js
diff --git a/public/javascripts/app/collections/likes.js b/app/assets/javascripts/app/collections/likes.js
similarity index 100%
rename from public/javascripts/app/collections/likes.js
rename to app/assets/javascripts/app/collections/likes.js
diff --git a/public/javascripts/app/collections/participations.js b/app/assets/javascripts/app/collections/participations.js
similarity index 100%
rename from public/javascripts/app/collections/participations.js
rename to app/assets/javascripts/app/collections/participations.js
diff --git a/public/javascripts/app/collections/photos.js b/app/assets/javascripts/app/collections/photos.js
similarity index 100%
rename from public/javascripts/app/collections/photos.js
rename to app/assets/javascripts/app/collections/photos.js
diff --git a/public/javascripts/app/collections/posts.js b/app/assets/javascripts/app/collections/posts.js
similarity index 100%
rename from public/javascripts/app/collections/posts.js
rename to app/assets/javascripts/app/collections/posts.js
diff --git a/public/javascripts/app/helpers/date_formatter.js b/app/assets/javascripts/app/helpers/date_formatter.js
similarity index 100%
rename from public/javascripts/app/helpers/date_formatter.js
rename to app/assets/javascripts/app/helpers/date_formatter.js
diff --git a/public/javascripts/app/helpers/handlebars-helpers.js b/app/assets/javascripts/app/helpers/handlebars-helpers.js
similarity index 100%
rename from public/javascripts/app/helpers/handlebars-helpers.js
rename to app/assets/javascripts/app/helpers/handlebars-helpers.js
diff --git a/public/javascripts/app/helpers/handlebars-partials.js b/app/assets/javascripts/app/helpers/handlebars-partials.js
similarity index 100%
rename from public/javascripts/app/helpers/handlebars-partials.js
rename to app/assets/javascripts/app/helpers/handlebars-partials.js
diff --git a/public/javascripts/app/helpers/text_formatter.js b/app/assets/javascripts/app/helpers/text_formatter.js
similarity index 100%
rename from public/javascripts/app/helpers/text_formatter.js
rename to app/assets/javascripts/app/helpers/text_formatter.js
diff --git a/public/javascripts/app/models/block.js b/app/assets/javascripts/app/models/block.js
similarity index 100%
rename from public/javascripts/app/models/block.js
rename to app/assets/javascripts/app/models/block.js
diff --git a/public/javascripts/app/models/comment.js b/app/assets/javascripts/app/models/comment.js
similarity index 100%
rename from public/javascripts/app/models/comment.js
rename to app/assets/javascripts/app/models/comment.js
diff --git a/public/javascripts/app/models/like.js b/app/assets/javascripts/app/models/like.js
similarity index 100%
rename from public/javascripts/app/models/like.js
rename to app/assets/javascripts/app/models/like.js
diff --git a/public/javascripts/app/models/participation.js b/app/assets/javascripts/app/models/participation.js
similarity index 100%
rename from public/javascripts/app/models/participation.js
rename to app/assets/javascripts/app/models/participation.js
diff --git a/public/javascripts/app/models/photo.js b/app/assets/javascripts/app/models/photo.js
similarity index 100%
rename from public/javascripts/app/models/photo.js
rename to app/assets/javascripts/app/models/photo.js
diff --git a/public/javascripts/app/models/photos.js b/app/assets/javascripts/app/models/photos.js
similarity index 100%
rename from public/javascripts/app/models/photos.js
rename to app/assets/javascripts/app/models/photos.js
diff --git a/public/javascripts/app/models/post.js b/app/assets/javascripts/app/models/post.js
similarity index 100%
rename from public/javascripts/app/models/post.js
rename to app/assets/javascripts/app/models/post.js
diff --git a/public/javascripts/app/models/reshare.js b/app/assets/javascripts/app/models/reshare.js
similarity index 100%
rename from public/javascripts/app/models/reshare.js
rename to app/assets/javascripts/app/models/reshare.js
diff --git a/public/javascripts/app/models/status_message.js b/app/assets/javascripts/app/models/status_message.js
similarity index 100%
rename from public/javascripts/app/models/status_message.js
rename to app/assets/javascripts/app/models/status_message.js
diff --git a/public/javascripts/app/models/stream.js b/app/assets/javascripts/app/models/stream.js
similarity index 97%
rename from public/javascripts/app/models/stream.js
rename to app/assets/javascripts/app/models/stream.js
index a164b04d9e73bacadd5db517b825450ac7fd40dd..619499c31c5ab5303b755cdb5ecc661445c3af0c 100644
--- a/public/javascripts/app/models/stream.js
+++ b/app/assets/javascripts/app/models/stream.js
@@ -1,3 +1,4 @@
+//= require ../collections/posts
 app.models.Stream = Backbone.Collection.extend({
   initialize : function(){
     this.posts = new app.collections.Posts([], this.postOptions());
diff --git a/public/javascripts/app/models/user.js b/app/assets/javascripts/app/models/user.js
similarity index 100%
rename from public/javascripts/app/models/user.js
rename to app/assets/javascripts/app/models/user.js
diff --git a/public/javascripts/app/pages/post-viewer.js b/app/assets/javascripts/app/pages/post-viewer.js
similarity index 100%
rename from public/javascripts/app/pages/post-viewer.js
rename to app/assets/javascripts/app/pages/post-viewer.js
diff --git a/public/javascripts/app/router.js b/app/assets/javascripts/app/router.js
similarity index 100%
rename from public/javascripts/app/router.js
rename to app/assets/javascripts/app/router.js
diff --git a/public/javascripts/app/views.js b/app/assets/javascripts/app/views.js
similarity index 100%
rename from public/javascripts/app/views.js
rename to app/assets/javascripts/app/views.js
diff --git a/public/javascripts/app/views/comment_stream_view.js b/app/assets/javascripts/app/views/comment_stream_view.js
similarity index 100%
rename from public/javascripts/app/views/comment_stream_view.js
rename to app/assets/javascripts/app/views/comment_stream_view.js
diff --git a/public/javascripts/app/views/comment_view.js b/app/assets/javascripts/app/views/comment_view.js
similarity index 96%
rename from public/javascripts/app/views/comment_view.js
rename to app/assets/javascripts/app/views/comment_view.js
index c85faf7a274e5833b0edaecd8eaf74e1300f4831..3145346fdd7f96904ea81de9922c35c3c7a298f1 100644
--- a/public/javascripts/app/views/comment_view.js
+++ b/app/assets/javascripts/app/views/comment_view.js
@@ -1,3 +1,4 @@
+//= require ./content_view
 app.views.Comment = app.views.Content.extend({
 
   templateName: "comment",
diff --git a/public/javascripts/app/views/content_view.js b/app/assets/javascripts/app/views/content_view.js
similarity index 98%
rename from public/javascripts/app/views/content_view.js
rename to app/assets/javascripts/app/views/content_view.js
index bb66c08f1bbb6e54d5214fe4ba1c5e82dae3e721..d6c7aa22642d09b90a9fd3ef23ede1b4fa6fe012 100644
--- a/public/javascripts/app/views/content_view.js
+++ b/app/assets/javascripts/app/views/content_view.js
@@ -1,3 +1,4 @@
+//= require ./stream_object_view
 app.views.Content = app.views.StreamObject.extend({
 
   events: {
diff --git a/public/javascripts/app/views/feedback_view.js b/app/assets/javascripts/app/views/feedback_view.js
similarity index 100%
rename from public/javascripts/app/views/feedback_view.js
rename to app/assets/javascripts/app/views/feedback_view.js
diff --git a/public/javascripts/app/views/header_view.js b/app/assets/javascripts/app/views/header_view.js
similarity index 100%
rename from public/javascripts/app/views/header_view.js
rename to app/assets/javascripts/app/views/header_view.js
diff --git a/public/javascripts/app/views/likes_info_view.js b/app/assets/javascripts/app/views/likes_info_view.js
similarity index 95%
rename from public/javascripts/app/views/likes_info_view.js
rename to app/assets/javascripts/app/views/likes_info_view.js
index 146f859a2cb52065bfa2050fc688550f3460b511..5069f8946f448eda5e09fc307569de8b33443e4a 100644
--- a/public/javascripts/app/views/likes_info_view.js
+++ b/app/assets/javascripts/app/views/likes_info_view.js
@@ -1,3 +1,4 @@
+//= require ./stream_object_view
 app.views.LikesInfo = app.views.StreamObject.extend({
 
   templateName : "likes-info",
diff --git a/public/javascripts/app/views/photo_view.js b/app/assets/javascripts/app/views/photo_view.js
similarity index 88%
rename from public/javascripts/app/views/photo_view.js
rename to app/assets/javascripts/app/views/photo_view.js
index c672863d4d4d64cacee743304293ba04e17ba12e..5500a95882428fd0acfe8ed64a271221df34cbc5 100644
--- a/public/javascripts/app/views/photo_view.js
+++ b/app/assets/javascripts/app/views/photo_view.js
@@ -1,3 +1,4 @@
+//= require ./stream_object_view
 app.views.Photo = app.views.StreamObject.extend({
 
   templateName: "photo",
diff --git a/public/javascripts/app/views/photos_view.js b/app/assets/javascripts/app/views/photos_view.js
similarity index 100%
rename from public/javascripts/app/views/photos_view.js
rename to app/assets/javascripts/app/views/photos_view.js
diff --git a/public/javascripts/app/views/post-viewer/author.js b/app/assets/javascripts/app/views/post-viewer/author.js
similarity index 100%
rename from public/javascripts/app/views/post-viewer/author.js
rename to app/assets/javascripts/app/views/post-viewer/author.js
diff --git a/public/javascripts/app/views/post-viewer/feedback.js b/app/assets/javascripts/app/views/post-viewer/feedback.js
similarity index 97%
rename from public/javascripts/app/views/post-viewer/feedback.js
rename to app/assets/javascripts/app/views/post-viewer/feedback.js
index 0b38c0588a433e6c79bde1e94d1bf6c10e4faf18..1e10ed3875bd5fe1353be1d5773c9d22d9d203bf 100644
--- a/public/javascripts/app/views/post-viewer/feedback.js
+++ b/app/assets/javascripts/app/views/post-viewer/feedback.js
@@ -1,3 +1,4 @@
+//= require ../feedback_view
 app.views.PostViewerFeedback = app.views.Feedback.extend({
 
   id : "user-controls",
diff --git a/public/javascripts/app/views/post-viewer/interactions.js b/app/assets/javascripts/app/views/post-viewer/interactions.js
similarity index 100%
rename from public/javascripts/app/views/post-viewer/interactions.js
rename to app/assets/javascripts/app/views/post-viewer/interactions.js
diff --git a/public/javascripts/app/views/post-viewer/nav.js b/app/assets/javascripts/app/views/post-viewer/nav.js
similarity index 100%
rename from public/javascripts/app/views/post-viewer/nav.js
rename to app/assets/javascripts/app/views/post-viewer/nav.js
diff --git a/public/javascripts/app/views/post-viewer/new_comment.js b/app/assets/javascripts/app/views/post-viewer/new_comment.js
similarity index 100%
rename from public/javascripts/app/views/post-viewer/new_comment.js
rename to app/assets/javascripts/app/views/post-viewer/new_comment.js
diff --git a/public/javascripts/app/views/post-viewer/reactions.js b/app/assets/javascripts/app/views/post-viewer/reactions.js
similarity index 100%
rename from public/javascripts/app/views/post-viewer/reactions.js
rename to app/assets/javascripts/app/views/post-viewer/reactions.js
diff --git a/public/javascripts/app/views/post_view.js b/app/assets/javascripts/app/views/post_view.js
similarity index 97%
rename from public/javascripts/app/views/post_view.js
rename to app/assets/javascripts/app/views/post_view.js
index 4f167fd3ae030b400d28748f08716d3e61756259..408ea4934cdae4a239165e35dedeb245ef72216a 100644
--- a/public/javascripts/app/views/post_view.js
+++ b/app/assets/javascripts/app/views/post_view.js
@@ -1,3 +1,4 @@
+//= require ./stream_object_view
 app.views.Post = app.views.StreamObject.extend({
   presenter : function() {
     return _.extend(this.defaultPresenter(), {
@@ -41,4 +42,4 @@ app.views.Post.Legacy = app.views.Post.extend({
   initialize : function(options) {
     this.templateName = options.templateName || this.templateName
   }
-})
\ No newline at end of file
+})
diff --git a/public/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js
similarity index 100%
rename from public/javascripts/app/views/publisher_view.js
rename to app/assets/javascripts/app/views/publisher_view.js
diff --git a/public/javascripts/app/views/stream_faces_view.js b/app/assets/javascripts/app/views/stream_faces_view.js
similarity index 100%
rename from public/javascripts/app/views/stream_faces_view.js
rename to app/assets/javascripts/app/views/stream_faces_view.js
diff --git a/public/javascripts/app/views/stream_object_view.js b/app/assets/javascripts/app/views/stream_object_view.js
similarity index 100%
rename from public/javascripts/app/views/stream_object_view.js
rename to app/assets/javascripts/app/views/stream_object_view.js
diff --git a/public/javascripts/app/views/stream_view.js b/app/assets/javascripts/app/views/stream_view.js
similarity index 100%
rename from public/javascripts/app/views/stream_view.js
rename to app/assets/javascripts/app/views/stream_view.js
diff --git a/public/javascripts/aspect-edit-pane.js b/app/assets/javascripts/aspect-edit-pane.js
similarity index 87%
rename from public/javascripts/aspect-edit-pane.js
rename to app/assets/javascripts/aspect-edit-pane.js
index c2b44f513672082ef393a781e6d8813386646281..b76f71a9c097866e18317af1461265df0d28eb4e 100644
--- a/public/javascripts/aspect-edit-pane.js
+++ b/app/assets/javascripts/aspect-edit-pane.js
@@ -1,7 +1,7 @@
 /*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-*   licensed under the Affero General Public License version 3 or later.  See
-*   the COPYRIGHT file.
-*/
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 
 function toggleAspectTitle(){
   $("#aspect_name_title").toggleClass('hidden');
diff --git a/public/javascripts/aspect-sorting.js b/app/assets/javascripts/aspect-sorting.js
similarity index 81%
rename from public/javascripts/aspect-sorting.js
rename to app/assets/javascripts/aspect-sorting.js
index 695050f8c9495fd570228c237c7c2d37fcca6382..74d08e17ab998a60fc625b4fce030062f3b3ece2 100644
--- a/public/javascripts/aspect-sorting.js
+++ b/app/assets/javascripts/aspect-sorting.js
@@ -1,7 +1,7 @@
 /*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-*   licensed under the Affero General Public License version 3 or later.  See
-*   the COPYRIGHT file.
-*/
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 
 $(document).ready(function() {
   $('#aspect_nav.left_nav .all_aspects .sub_nav').sortable({
diff --git a/public/javascripts/aspects-dropdown.js b/app/assets/javascripts/aspects-dropdown.js
similarity index 100%
rename from public/javascripts/aspects-dropdown.js
rename to app/assets/javascripts/aspects-dropdown.js
diff --git a/public/javascripts/contact-edit.js b/app/assets/javascripts/contact-edit.js
similarity index 100%
rename from public/javascripts/contact-edit.js
rename to app/assets/javascripts/contact-edit.js
diff --git a/public/javascripts/contact-list.js b/app/assets/javascripts/contact-list.js
similarity index 94%
rename from public/javascripts/contact-list.js
rename to app/assets/javascripts/contact-list.js
index 2a5e0d6849928afdb157c12400e32116585c259f..17700a851817ad7117974b182c665135526c046a 100644
--- a/public/javascripts/contact-list.js
+++ b/app/assets/javascripts/contact-list.js
@@ -1,7 +1,7 @@
 /*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-*   licensed under the Affero General Public License version 3 or later.  See
-*   the COPYRIGHT file.
-*/
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 
 var List = {
   initialize: function() {
diff --git a/public/javascripts/diaspora.js b/app/assets/javascripts/diaspora.js
similarity index 96%
rename from public/javascripts/diaspora.js
rename to app/assets/javascripts/diaspora.js
index e6270bf13caff8236c8b285dcfa559b600bce547..adac01509d742a7a96fb693f29967f09f984b292 100644
--- a/public/javascripts/diaspora.js
+++ b/app/assets/javascripts/diaspora.js
@@ -1,7 +1,7 @@
 /*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-*   licensed under the Affero General Public License version 3 or later.  See
-*   the COPYRIGHT file.
-*/
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 
 (function() {
   var Diaspora = {
diff --git a/app/assets/javascripts/finder.js b/app/assets/javascripts/finder.js
new file mode 100644
index 0000000000000000000000000000000000000000..8fd8ee68d68a863e0f43d092def593162029fc5c
--- /dev/null
+++ b/app/assets/javascripts/finder.js
@@ -0,0 +1,5 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require friend-finder
\ No newline at end of file
diff --git a/public/javascripts/friend-finder.js b/app/assets/javascripts/friend-finder.js
similarity index 100%
rename from public/javascripts/friend-finder.js
rename to app/assets/javascripts/friend-finder.js
diff --git a/public/javascripts/helpers/alert.js b/app/assets/javascripts/helpers/alert.js
similarity index 100%
rename from public/javascripts/helpers/alert.js
rename to app/assets/javascripts/helpers/alert.js
diff --git a/public/javascripts/helpers/i18n.js b/app/assets/javascripts/helpers/i18n.js
similarity index 100%
rename from public/javascripts/helpers/i18n.js
rename to app/assets/javascripts/helpers/i18n.js
diff --git a/app/assets/javascripts/home.js b/app/assets/javascripts/home.js
new file mode 100644
index 0000000000000000000000000000000000000000..b8335550be113e2f508093a0c8a89d83e99e4dc4
--- /dev/null
+++ b/app/assets/javascripts/home.js
@@ -0,0 +1,8 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require publisher
+//= require jquery.textchange.min
+//= require aspect-edit-pane
+//= require fileuploader-custom
\ No newline at end of file
diff --git a/public/javascripts/ie.js b/app/assets/javascripts/ie.js
similarity index 98%
rename from public/javascripts/ie.js
rename to app/assets/javascripts/ie.js
index 3cdb1968340167b277ce88f3df134750f0b7577a..c1f744f5ec92d26992def546158b575929a4eb14 100644
--- a/public/javascripts/ie.js
+++ b/app/assets/javascripts/ie.js
@@ -1,3 +1,2 @@
 document.createElement('header');
 document.createElement('footer');
-
diff --git a/public/javascripts/inbox.js b/app/assets/javascripts/inbox.js
similarity index 98%
rename from public/javascripts/inbox.js
rename to app/assets/javascripts/inbox.js
index 1e4515aa159c13666b4cffda90051c23c4fb35a0..cbed2ac791c5af97e1fac320a980da9a47f9fce8 100644
--- a/public/javascripts/inbox.js
+++ b/app/assets/javascripts/inbox.js
@@ -2,6 +2,7 @@
  *   licensed under the Affero General Public License version 3 or later.  See
  *   the COPYRIGHT file.
  */
+//= require jquery.autoSuggest.custom
 
 $(document).ready(function(){
 
diff --git a/public/javascripts/login.js b/app/assets/javascripts/login.js
similarity index 81%
rename from public/javascripts/login.js
rename to app/assets/javascripts/login.js
index 6d39d4f60d7a0a34c088bd18e80dae50bf8af010..60da5e47e088c5279c7913ab8af7414e6893ad4c 100644
--- a/public/javascripts/login.js
+++ b/app/assets/javascripts/login.js
@@ -1,3 +1,7 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 jQuery.fn.center = function () {
   this.css("position","absolute");
   this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
diff --git a/app/assets/javascripts/mailchimp.js b/app/assets/javascripts/mailchimp.js
new file mode 100644
index 0000000000000000000000000000000000000000..6254d04020cc47a74f71ab13cb1aeca0236f1a3f
--- /dev/null
+++ b/app/assets/javascripts/mailchimp.js
@@ -0,0 +1,3 @@
+//= require mailchimp/jquery.form
+//= require mailchimp/jquery.validate
+//= require mailchimp/jquery126.min
\ No newline at end of file
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
new file mode 100644
index 0000000000000000000000000000000000000000..69013f3d6a66b47964b0a82c52fd06d0313ea2d9
--- /dev/null
+++ b/app/assets/javascripts/main.js
@@ -0,0 +1,37 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require rails.validations
+//= require jquery.hotkeys
+//= require jquery.autoresize
+//= require jquery-ui-1.8.9.custom.min
+//= require jquery.charcount
+//= require jquery.placeholder
+//= require timeago
+//= require facebox
+//= require underscore
+//= require jquery.events.input
+//= require jquery.elastic
+//= require jquery.mentionsInput
+//= require jquery.idle-timer
+//= require jquery.infinitescroll-custom
+//= require jquery.autocomplete-custom
+//= require keycodes
+//= require fileuploader-custom
+//= require backbone
+//= require handlebars-1.0.0.beta.6
+//= require markdown
+//= require app/app
+//= require diaspora
+//= require_tree ./helpers
+//= require_tree ./pages
+//= require_tree ./widgets
+//= require view
+//= require aspects-dropdown
+//= require contact-edit
+//= require contact-list
+//= require aspect-sorting
+//= require mentions
+//= require bootstrap/bootstrap-twipsy
+//= require bootstrap/bootstrap-popover
\ No newline at end of file
diff --git a/public/javascripts/mentions.js b/app/assets/javascripts/mentions.js
similarity index 100%
rename from public/javascripts/mentions.js
rename to app/assets/javascripts/mentions.js
diff --git a/public/javascripts/mobile.js b/app/assets/javascripts/mobile.js
similarity index 97%
rename from public/javascripts/mobile.js
rename to app/assets/javascripts/mobile.js
index 554c0f3190074753356f3d1c36cfa701eeb5b87d..04ade685dd5d99bc7d45a8fb1b4a4c6f5cbee0a1 100644
--- a/public/javascripts/mobile.js
+++ b/app/assets/javascripts/mobile.js
@@ -1,3 +1,9 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require jquery.charcount
+//= require mbp-helper
 $(document).ready(function(){
 
   $('.shield a').click(function(){
diff --git a/public/javascripts/pages/aspects-index.js b/app/assets/javascripts/pages/aspects-index.js
similarity index 100%
rename from public/javascripts/pages/aspects-index.js
rename to app/assets/javascripts/pages/aspects-index.js
diff --git a/public/javascripts/pages/contacts-index.js b/app/assets/javascripts/pages/contacts-index.js
similarity index 100%
rename from public/javascripts/pages/contacts-index.js
rename to app/assets/javascripts/pages/contacts-index.js
diff --git a/public/javascripts/pages/featured-users-index.js b/app/assets/javascripts/pages/featured-users-index.js
similarity index 100%
rename from public/javascripts/pages/featured-users-index.js
rename to app/assets/javascripts/pages/featured-users-index.js
diff --git a/public/javascripts/pages/invitations-edit.js b/app/assets/javascripts/pages/invitations-edit.js
similarity index 100%
rename from public/javascripts/pages/invitations-edit.js
rename to app/assets/javascripts/pages/invitations-edit.js
diff --git a/public/javascripts/pages/invitations-new.js b/app/assets/javascripts/pages/invitations-new.js
similarity index 100%
rename from public/javascripts/pages/invitations-new.js
rename to app/assets/javascripts/pages/invitations-new.js
diff --git a/public/javascripts/pages/notifications-index.js b/app/assets/javascripts/pages/notifications-index.js
similarity index 100%
rename from public/javascripts/pages/notifications-index.js
rename to app/assets/javascripts/pages/notifications-index.js
diff --git a/public/javascripts/pages/services-finder.js b/app/assets/javascripts/pages/services-finder.js
similarity index 100%
rename from public/javascripts/pages/services-finder.js
rename to app/assets/javascripts/pages/services-finder.js
diff --git a/public/javascripts/pages/users-getting-started.js b/app/assets/javascripts/pages/users-getting-started.js
similarity index 100%
rename from public/javascripts/pages/users-getting-started.js
rename to app/assets/javascripts/pages/users-getting-started.js
diff --git a/app/assets/javascripts/people.js b/app/assets/javascripts/people.js
new file mode 100644
index 0000000000000000000000000000000000000000..68a947224041d89eeaccad6ccaa67d1f9d06f23f
--- /dev/null
+++ b/app/assets/javascripts/people.js
@@ -0,0 +1,7 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require aspect-edit-pane
+//= require fileuploader-custom
+//= require jquery.autoSuggest.custom
\ No newline at end of file
diff --git a/public/javascripts/photo-show.js b/app/assets/javascripts/photo-show.js
similarity index 100%
rename from public/javascripts/photo-show.js
rename to app/assets/javascripts/photo-show.js
diff --git a/app/assets/javascripts/photos.js b/app/assets/javascripts/photos.js
new file mode 100644
index 0000000000000000000000000000000000000000..db77f42ff4a2cc48836c1ac2d408f8b6f6df7866
--- /dev/null
+++ b/app/assets/javascripts/photos.js
@@ -0,0 +1,5 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require photo-show
\ No newline at end of file
diff --git a/app/assets/javascripts/profile.js b/app/assets/javascripts/profile.js
new file mode 100644
index 0000000000000000000000000000000000000000..6dabf020ed53c37038a9317d3a6c38c467030dca
--- /dev/null
+++ b/app/assets/javascripts/profile.js
@@ -0,0 +1,5 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require jquery.autoSuggest.custom
\ No newline at end of file
diff --git a/public/javascripts/publisher.js b/app/assets/javascripts/publisher.js
similarity index 100%
rename from public/javascripts/publisher.js
rename to app/assets/javascripts/publisher.js
diff --git a/app/assets/javascripts/templates.js b/app/assets/javascripts/templates.js
new file mode 100644
index 0000000000000000000000000000000000000000..b46d3dab23a540d41e896fb9b0ad8702f8608842
--- /dev/null
+++ b/app/assets/javascripts/templates.js
@@ -0,0 +1,5 @@
+/*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
+//= require_tree ../templates
diff --git a/public/javascripts/view.js b/app/assets/javascripts/view.js
similarity index 97%
rename from public/javascripts/view.js
rename to app/assets/javascripts/view.js
index 9728b1083beb6ca666cd3d4cf9de0ae341046ccd..9dc4f2e8f3d1c4c3be5219bd572a7796a9c2a6a7 100644
--- a/public/javascripts/view.js
+++ b/app/assets/javascripts/view.js
@@ -1,7 +1,7 @@
 /*   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-*   licensed under the Affero General Public License version 3 or later.  See
-*   the COPYRIGHT file.
-*/
+ *   licensed under the Affero General Public License version 3 or later.  See
+ *   the COPYRIGHT file.
+ */
 var View = {
   initialize: function() {
     /* Buttons */
diff --git a/public/javascripts/widgets/aspect-navigation.js b/app/assets/javascripts/widgets/aspect-navigation.js
similarity index 100%
rename from public/javascripts/widgets/aspect-navigation.js
rename to app/assets/javascripts/widgets/aspect-navigation.js
diff --git a/public/javascripts/widgets/back-to-top.js b/app/assets/javascripts/widgets/back-to-top.js
similarity index 100%
rename from public/javascripts/widgets/back-to-top.js
rename to app/assets/javascripts/widgets/back-to-top.js
diff --git a/public/javascripts/widgets/direction-detector.js b/app/assets/javascripts/widgets/direction-detector.js
similarity index 100%
rename from public/javascripts/widgets/direction-detector.js
rename to app/assets/javascripts/widgets/direction-detector.js
diff --git a/public/javascripts/widgets/flash-messages.js b/app/assets/javascripts/widgets/flash-messages.js
similarity index 100%
rename from public/javascripts/widgets/flash-messages.js
rename to app/assets/javascripts/widgets/flash-messages.js
diff --git a/public/javascripts/widgets/header.js b/app/assets/javascripts/widgets/header.js
similarity index 100%
rename from public/javascripts/widgets/header.js
rename to app/assets/javascripts/widgets/header.js
diff --git a/public/javascripts/widgets/hovercard.js b/app/assets/javascripts/widgets/hovercard.js
similarity index 100%
rename from public/javascripts/widgets/hovercard.js
rename to app/assets/javascripts/widgets/hovercard.js
diff --git a/public/javascripts/widgets/infinite-scroll.js b/app/assets/javascripts/widgets/infinite-scroll.js
similarity index 100%
rename from public/javascripts/widgets/infinite-scroll.js
rename to app/assets/javascripts/widgets/infinite-scroll.js
diff --git a/public/javascripts/widgets/lightbox.js b/app/assets/javascripts/widgets/lightbox.js
similarity index 100%
rename from public/javascripts/widgets/lightbox.js
rename to app/assets/javascripts/widgets/lightbox.js
diff --git a/public/javascripts/widgets/notifications-badge.js b/app/assets/javascripts/widgets/notifications-badge.js
similarity index 100%
rename from public/javascripts/widgets/notifications-badge.js
rename to app/assets/javascripts/widgets/notifications-badge.js
diff --git a/public/javascripts/widgets/notifications.js b/app/assets/javascripts/widgets/notifications.js
similarity index 100%
rename from public/javascripts/widgets/notifications.js
rename to app/assets/javascripts/widgets/notifications.js
diff --git a/public/javascripts/widgets/search.js b/app/assets/javascripts/widgets/search.js
similarity index 100%
rename from public/javascripts/widgets/search.js
rename to app/assets/javascripts/widgets/search.js
diff --git a/public/javascripts/widgets/stream.js b/app/assets/javascripts/widgets/stream.js
similarity index 100%
rename from public/javascripts/widgets/stream.js
rename to app/assets/javascripts/widgets/stream.js
diff --git a/public/javascripts/widgets/timeago.js b/app/assets/javascripts/widgets/timeago.js
similarity index 100%
rename from public/javascripts/widgets/timeago.js
rename to app/assets/javascripts/widgets/timeago.js
diff --git a/app/assets/stylesheets/mobile.css.scss b/app/assets/stylesheets/mobile.css.scss
index e97a13f516e906b17fe01541ad85e8469bb0421a..ea1b040fd2034ed6a3bf0cb760e34afeacf3ffb4 100644
--- a/app/assets/stylesheets/mobile.css.scss
+++ b/app/assets/stylesheets/mobile.css.scss
@@ -1,5 +1,5 @@
-@import 'vendor/bootstrap.css'
-@import 'vendor/bootstrap-responsive.css'
+@import 'vendor/bootstrap.css';
+@import 'vendor/bootstrap-responsive.css';
 @import "_mixins.css.scss";
 
 $blue: #3f8fba;
diff --git a/public/javascripts/app/templates/activity-streams-photo.handlebars b/app/assets/templates/activity-streams-photo.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/activity-streams-photo.handlebars
rename to app/assets/templates/activity-streams-photo.jst.hbs
diff --git a/app/assets/templates/all.js b/app/assets/templates/all.js
new file mode 100644
index 0000000000000000000000000000000000000000..6b5f34068c63c4df0819cbcfd3248b3c63c16fff
--- /dev/null
+++ b/app/assets/templates/all.js
@@ -0,0 +1,4 @@
+// Workaround to keep "app/templates" out of the template names
+// All templates will remain in the JST namespace just as they were
+// when we were using Jammit
+//= require_tree .
\ No newline at end of file
diff --git a/public/javascripts/app/templates/comment-stream.handlebars b/app/assets/templates/comment-stream.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/comment-stream.handlebars
rename to app/assets/templates/comment-stream.jst.hbs
diff --git a/public/javascripts/app/templates/comment.handlebars b/app/assets/templates/comment.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/comment.handlebars
rename to app/assets/templates/comment.jst.hbs
diff --git a/public/javascripts/app/templates/feedback.handlebars b/app/assets/templates/feedback.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/feedback.handlebars
rename to app/assets/templates/feedback.jst.hbs
diff --git a/public/javascripts/app/templates/header.handlebars b/app/assets/templates/header.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/header.handlebars
rename to app/assets/templates/header.jst.hbs
diff --git a/public/javascripts/app/templates/likes-info.handlebars b/app/assets/templates/likes-info.jst.hbs
similarity index 90%
rename from public/javascripts/app/templates/likes-info.handlebars
rename to app/assets/templates/likes-info.jst.hbs
index b059bdd929e25291a1caf7312e8bf0cd2bf4e171..6a833be78c5e0f8596a913c2749ce2789459b871 100644
--- a/public/javascripts/app/templates/likes-info.handlebars
+++ b/app/assets/templates/likes-info.jst.hbs
@@ -2,7 +2,7 @@
   <div class="comment">
     <div class="media">
       <span class="img">
-        <img alt="Heart" src="{{imageUrl "heart.png"}}" />
+        <img alt="Heart" src="{{imageUrl "icons/heart.png"}}" />
       </span>
 
       <div class="bd">
diff --git a/public/javascripts/app/templates/photo.handlebars b/app/assets/templates/photo.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/photo.handlebars
rename to app/assets/templates/photo.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer.handlebars b/app/assets/templates/post-viewer.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer.handlebars
rename to app/assets/templates/post-viewer.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/author.handlebars b/app/assets/templates/post-viewer/author.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/author.handlebars
rename to app/assets/templates/post-viewer/author.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/comment.handlebars b/app/assets/templates/post-viewer/comment.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/comment.handlebars
rename to app/assets/templates/post-viewer/comment.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/activity-streams-photo.handlebars b/app/assets/templates/post-viewer/content/activity-streams-photo.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/activity-streams-photo.handlebars
rename to app/assets/templates/post-viewer/content/activity-streams-photo.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/multi-photo.handlebars b/app/assets/templates/post-viewer/content/multi-photo.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/multi-photo.handlebars
rename to app/assets/templates/post-viewer/content/multi-photo.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/note.handlebars b/app/assets/templates/post-viewer/content/note.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/note.handlebars
rename to app/assets/templates/post-viewer/content/note.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/photo-backdrop.handlebars b/app/assets/templates/post-viewer/content/photo-backdrop.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/photo-backdrop.handlebars
rename to app/assets/templates/post-viewer/content/photo-backdrop.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/rich-media.handlebars b/app/assets/templates/post-viewer/content/rich-media.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/rich-media.handlebars
rename to app/assets/templates/post-viewer/content/rich-media.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/status-with-photo-backdrop.handlebars b/app/assets/templates/post-viewer/content/status-with-photo-backdrop.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/status-with-photo-backdrop.handlebars
rename to app/assets/templates/post-viewer/content/status-with-photo-backdrop.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/content/status.handlebars b/app/assets/templates/post-viewer/content/status.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/content/status.handlebars
rename to app/assets/templates/post-viewer/content/status.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/feedback.handlebars b/app/assets/templates/post-viewer/feedback.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/feedback.handlebars
rename to app/assets/templates/post-viewer/feedback.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/interactions.handlebars b/app/assets/templates/post-viewer/interactions.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/interactions.handlebars
rename to app/assets/templates/post-viewer/interactions.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/nav.handlebars b/app/assets/templates/post-viewer/nav.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/nav.handlebars
rename to app/assets/templates/post-viewer/nav.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/new-comment.handlebars b/app/assets/templates/post-viewer/new-comment.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/new-comment.handlebars
rename to app/assets/templates/post-viewer/new-comment.jst.hbs
diff --git a/public/javascripts/app/templates/post-viewer/reactions.handlebars b/app/assets/templates/post-viewer/reactions.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/post-viewer/reactions.handlebars
rename to app/assets/templates/post-viewer/reactions.jst.hbs
diff --git a/public/javascripts/app/templates/reshare.handlebars b/app/assets/templates/reshare.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/reshare.handlebars
rename to app/assets/templates/reshare.jst.hbs
diff --git a/public/javascripts/app/templates/static-text.handlebars b/app/assets/templates/static-text.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/static-text.handlebars
rename to app/assets/templates/static-text.jst.hbs
diff --git a/public/javascripts/app/templates/status-message.handlebars b/app/assets/templates/status-message.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/status-message.handlebars
rename to app/assets/templates/status-message.jst.hbs
diff --git a/public/javascripts/app/templates/stream-element.handlebars b/app/assets/templates/stream-element.jst.hbs
similarity index 93%
rename from public/javascripts/app/templates/stream-element.handlebars
rename to app/assets/templates/stream-element.jst.hbs
index 89503daf778f1461025a214ba3c840dbfde1d140..303d1988f77d011dab1bad974d9a462e2bc03556 100644
--- a/public/javascripts/app/templates/stream-element.handlebars
+++ b/app/assets/templates/stream-element.jst.hbs
@@ -4,7 +4,7 @@
     <div class="controls">
       {{#unless authorIsCurrentUser}}
         <a href="#" rel=nofollow>
-          <img src="{{imageUrl "ignoreuser.png"}}"" alt="Ignoreuser" class="block_user control_icon" title="{{t "ignore"}}" />
+          <img src="{{imageUrl "icons/ignoreuser.png"}}"" alt="Ignoreuser" class="block_user control_icon" title="{{t "ignore"}}" />
         </a>
         <a href="#" rel=nofollow>
           <img src="{{imageUrl "deletelabel.png"}}" class="delete control_icon hide_post" title="{{t "stream.hide"}}" />
diff --git a/public/javascripts/app/templates/stream-faces.handlebars b/app/assets/templates/stream-faces.jst.hbs
similarity index 100%
rename from public/javascripts/app/templates/stream-faces.handlebars
rename to app/assets/templates/stream-faces.jst.hbs
diff --git a/app/views/apps/show.html.haml b/app/views/apps/show.html.haml
index 63b7eafce26cb6d13ddd34aa0e9d585e84ab158a..7a8fa4b7240e0be2c9a88ad8f0f4c90c41b8cb76 100644
--- a/app/views/apps/show.html.haml
+++ b/app/views/apps/show.html.haml
@@ -6,7 +6,7 @@
   = "everything happening from #{@app}"
 
 - content_for :head do
-  = include_javascripts :home
+  = javascript_include_tag :home
 
 - content_for :body_class do
   = "apps_show"
diff --git a/app/views/contacts/index.html.haml b/app/views/contacts/index.html.haml
index 16e1c6201f16263250fbcf50611f9f76be28b231..5c7d89386375e5e2bae3c9b60fe2bbcb3120f398 100644
--- a/app/views/contacts/index.html.haml
+++ b/app/views/contacts/index.html.haml
@@ -6,7 +6,7 @@
   = t('.title')
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
 
 #section_header
   %h2
diff --git a/app/views/contacts/index.mobile.haml b/app/views/contacts/index.mobile.haml
index aa6044cc3082ad1fa5bce12c27477ef0ae0836ba..788a116d83ac0dbc05f92ccfe03c3cfd20e43d64 100644
--- a/app/views/contacts/index.mobile.haml
+++ b/app/views/contacts/index.mobile.haml
@@ -6,7 +6,7 @@
   = t('.title')
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
 
 #section_header
   %h2
diff --git a/app/views/contacts/spotlight.haml b/app/views/contacts/spotlight.haml
index 9347ebb48264687fa414fef58ed783f81eff4b7b..3c5eb9d208316fd832514428f432082098da326e 100644
--- a/app/views/contacts/spotlight.haml
+++ b/app/views/contacts/spotlight.haml
@@ -6,7 +6,7 @@
   = t('contacts.spotlight.community_spotlight')
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
 
 #section_header
   %h2
diff --git a/app/views/conversations/index.haml b/app/views/conversations/index.haml
index 44ace12c2a6ac196bccbf988aa74d11a09e662bb..c9fd40a432e2a37b59229696ab33dc9bea3a78f9 100644
--- a/app/views/conversations/index.haml
+++ b/app/views/conversations/index.haml
@@ -4,7 +4,7 @@
 
 
 - content_for :head do
-  = include_javascripts :inbox
+  = javascript_include_tag :inbox
 
 - content_for :page_title do
   = t('.message_inbox')
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 057af16be747d4d7c6cd99f4ba996fc3aea4e33c..a3a0c4c7ac5ea4fb7de075bc9b7c9b4c7c72128a 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -26,13 +26,13 @@
 
     = old_browser_js_support
     <!--[if IE]>
-    = include_javascripts :ie
+    = javascript_include_tag :ie
     <![endif]-->
 
     = javascript_include_tag 'jquery', 'jquery_ujs'
 
     - unless @landing_page
-      = include_javascripts :main, :templates
+      = javascript_include_tag :main, :templates
       = load_javascript_locales
 
     = set_asset_host
diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml
index 378c25ca27f22b4ffc71666babd1dfbb4909b396..b116f579f605a7d24b8ddf0557c15553445d25b7 100644
--- a/app/views/layouts/application.mobile.haml
+++ b/app/views/layouts/application.mobile.haml
@@ -78,7 +78,7 @@
 
     / javascripts at the bottom
     = jquery_include_tag
-    = include_javascripts :mobile
+    = javascript_include_tag :mobile
 
     :javascript
       MBP.hideUrlBar();
diff --git a/app/views/layouts/main_stream.html.haml b/app/views/layouts/main_stream.html.haml
index 93476712f877004f3a3e7c5733abc014245177a2..4aa30e9fd6578ac546e3d78b08bd51338e32464f 100644
--- a/app/views/layouts/main_stream.html.haml
+++ b/app/views/layouts/main_stream.html.haml
@@ -4,7 +4,7 @@
 
 
 - content_for :head do
-  = include_javascripts :home
+  = javascript_include_tag :home
 
 - if current_user.getting_started?
   #welcome-to-diaspora
diff --git a/app/views/layouts/post.html.haml b/app/views/layouts/post.html.haml
index 7346b1596a21c070a277bd526d72aff38314a721..d7a288d150fd8ca24f258c8641ec2801e0edcf5b 100644
--- a/app/views/layouts/post.html.haml
+++ b/app/views/layouts/post.html.haml
@@ -30,7 +30,7 @@
 
     = old_browser_js_support
     <!--[if IE]>
-    = include_javascripts :ie
+    = javascript_include_tag :ie
     <![endif]-->
 
     = jquery_include_tag
@@ -38,7 +38,7 @@
     = set_current_user_in_javascript
 
     - unless @landing_page
-      = include_javascripts :main, :templates
+      = javascript_include_tag :main, :templates
       = load_javascript_locales
 
     = set_asset_host
diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml
index 5bfd9ebe5aed98df427f9a1ad6263f3c9f0b331b..1c7b302d33131862c1023c7c8e97562229b93184 100644
--- a/app/views/people/contacts.haml
+++ b/app/views/people/contacts.haml
@@ -4,7 +4,7 @@
 
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
 
 - content_for :page_title do
   = @person.name
diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml
index 8e48bb021a0425f4779a3f0c0360b1c2c2d896eb..3771ee66c2c15406ef47c6f1eb2d497a8fc5b4be 100644
--- a/app/views/people/index.html.haml
+++ b/app/views/people/index.html.haml
@@ -6,7 +6,7 @@
   = t('search')
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
   = javascript_include_tag 'contact-list'
 
 .span-24.last
diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml
index 2e97600abe7ab76cc713d0b66d102ea6d467c5d5..54ae49a598b698eb12f99ccbb2841f308449ab9a 100644
--- a/app/views/people/show.html.haml
+++ b/app/views/people/show.html.haml
@@ -4,7 +4,7 @@
 
 
 - content_for :head do
-  = include_javascripts :people
+  = javascript_include_tag :people
   :javascript
     Mentions.options.prefillMention = #{@person.to_json};
 
diff --git a/app/views/posts/_photo.html.haml b/app/views/posts/_photo.html.haml
index da367f8f96a7419cc10e131e5e4da2811e848113..f9158a3e8f598f4e5a2324ec70dca0ada5432137 100644
--- a/app/views/posts/_photo.html.haml
+++ b/app/views/posts/_photo.html.haml
@@ -3,7 +3,7 @@
 -#   the COPYRIGHT file.
 
 - content_for :head do
-  = include_javascripts :photos
+  = javascript_include_tag :photos
 
 #author_info
   = person_image_link(post.author)
diff --git a/app/views/profiles/_edit_public.haml b/app/views/profiles/_edit_public.haml
index eaed1e31abc1a8ed19991bbbd0e6c14046cabca2..89a59ad5e58e24074c7c7aaf610876cb5ff3cbcf 100644
--- a/app/views/profiles/_edit_public.haml
+++ b/app/views/profiles/_edit_public.haml
@@ -3,7 +3,7 @@
 -#   the COPYRIGHT file.
 
 - content_for :head do
-  = include_javascripts :profile
+  = javascript_include_tag :profile
 
   :javascript
     $(document).ready(function () {
diff --git a/app/views/services/finder.html.haml b/app/views/services/finder.html.haml
index 0484e2a38cdaf39c261bd39654ed7b2e562550ec..e2c419dc3ecd31882bfa4372afb74aa448a4f3a0 100644
--- a/app/views/services/finder.html.haml
+++ b/app/views/services/finder.html.haml
@@ -3,7 +3,7 @@
 -#   the COPYRIGHT file.
 
 - content_for :head do
-  = include_javascripts :finder
+  = javascript_include_tag :finder
 
 #section_header
   %h2
diff --git a/app/views/sessions/new.haml b/app/views/sessions/new.haml
index 68cb3e1f7a88ae7f747fda20da61aa4853816e6a..91788e0ae5ab19a82a32c935ce2361bdaa86cb59 100644
--- a/app/views/sessions/new.haml
+++ b/app/views/sessions/new.haml
@@ -7,7 +7,7 @@
   | DIASPORA* ALPHA
 
 = content_for :head do
-  = include_javascripts :login
+  = javascript_include_tag :login
 
   :css
     header, #flash_alert { display:none; }
diff --git a/app/views/shared/_mail_signup_form.erb b/app/views/shared/_mail_signup_form.erb
index 24603af8250a6d08f007ac35ee38fd56d47dc6eb..e6ae05cb4f8781936758a2aae489d0cd544454f5 100644
--- a/app/views/shared/_mail_signup_form.erb
+++ b/app/views/shared/_mail_signup_form.erb
@@ -1,6 +1,6 @@
 
 <!-- Begin MailChimp Signup Form -->
-<%= include_javascripts :mailchimp %>
+<%= javascript_include_tag :mailchimp %>
 <div id="mc_embed_signup">
 <form action="http://joindiaspora.us1.list-manage.com/subscribe/post?u=d759919b94f9cdcf39d204f3f&amp;id=7b5ceb2f8b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
 	
diff --git a/app/views/status_messages/bookmarklet.html.haml b/app/views/status_messages/bookmarklet.html.haml
index afb8be0071d084dcf611f77ce29cbc62e16fa840..0976661a322021489dff03f9614636472aaa2a3f 100644
--- a/app/views/status_messages/bookmarklet.html.haml
+++ b/app/views/status_messages/bookmarklet.html.haml
@@ -19,7 +19,7 @@
     = csrf_meta_tag
 
     = jquery_include_tag
-    = include_javascripts :main, :templates, :home
+    = javascript_include_tag :main, :templates, :home
     :javascript
       Diaspora.I18n.loadLocale(#{get_javascript_strings_for(I18n.locale).to_json}, "#{I18n.locale}");
     
diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml
index b90eb33ef39d74d5e4c9a7b20feb500e3c581048..02f11a6b8aecbf77442e1d293065252c8d30eb28 100644
--- a/app/views/tags/show.haml
+++ b/app/views/tags/show.haml
@@ -10,7 +10,7 @@
     = t('.whatup', :pod => @pod_url)
 
 - content_for :head do
-  = include_javascripts :home
+  = javascript_include_tag :home
   :javascript
     $(document).ready(function(){
       // Change the text and color of the "follow this tag" button on hover.
diff --git a/app/views/users/getting_started.haml b/app/views/users/getting_started.haml
index 7347c2cfc089b0927dde171bd4c70699439f4fad..15d9428b16389e8a111c1c74379b1cce3f3df4ca 100644
--- a/app/views/users/getting_started.haml
+++ b/app/views/users/getting_started.haml
@@ -3,7 +3,7 @@
 -#   the COPYRIGHT file.
 
 - content_for :head do
-  = include_javascripts :profile
+  = javascript_include_tag :profile
 
 %br
 
diff --git a/config/application.rb b/config/application.rb
index 444999cf1ded7d7426f317307037ff4a41155d4d..8c3c4ce0d8fd06880fe04e139df25c26439b1539 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -63,8 +63,24 @@ module Diaspora
     config.filter_parameters += [:text]
     config.filter_parameters += [:bio]
 
-     # Enable the asset pipeline
-     config.assets.enabled = true
+    # Enable the asset pipeline
+    config.assets.enabled = true
+
+    # For easier deployment to Heroku
+    config.assets.initialize_on_precompile = false
+
+    # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+    # Javascripts
+    config.assets.precompile += [ "finder.js", "home.js", "ie.js", "inbox.js",
+      "jquery.js", "jquery_ujs.js", "login.js", "mailchimp.js", "main.js",
+      "mobile.js", "profile.js", "people.js", "photos.js", "templates.js" ]
+
+    # Stylesheets
+    config.assets.precompile += [ "blueprint.css", "bootstrap.css", "default.css",
+      "login.css", "mobile.css", "new_templates.css", "rtl.css" ]
+
+    # Version of your assets, change this if you want to expire all your assets
+    config.assets.version = '1.0'
 
   end
 end
diff --git a/features/support/always_use_local_jquery.rb b/features/support/always_use_local_jquery.rb
index faa428fe4ad3f1e30e3228cc8d7e73f864c951be..50f692df119be3c21d01548b96f3f3b0b098af3d 100644
--- a/features/support/always_use_local_jquery.rb
+++ b/features/support/always_use_local_jquery.rb
@@ -1,5 +1,5 @@
 module ApplicationHelper
   def jquery_include_tag
-    include_javascripts :jquery
+    javascript_include_tag :jquery
   end
 end
\ No newline at end of file
diff --git a/public/javascripts/vendor/backbone.js b/vendor/assets/javascripts/backbone.js
similarity index 100%
rename from public/javascripts/vendor/backbone.js
rename to vendor/assets/javascripts/backbone.js
diff --git a/public/javascripts/vendor/bootstrap/bootstrap-modal.js b/vendor/assets/javascripts/bootstrap/bootstrap-modal.js
similarity index 100%
rename from public/javascripts/vendor/bootstrap/bootstrap-modal.js
rename to vendor/assets/javascripts/bootstrap/bootstrap-modal.js
diff --git a/public/javascripts/vendor/bootstrap/bootstrap-popover.js b/vendor/assets/javascripts/bootstrap/bootstrap-popover.js
similarity index 100%
rename from public/javascripts/vendor/bootstrap/bootstrap-popover.js
rename to vendor/assets/javascripts/bootstrap/bootstrap-popover.js
diff --git a/public/javascripts/vendor/bootstrap/bootstrap-transition.js b/vendor/assets/javascripts/bootstrap/bootstrap-transition.js
similarity index 100%
rename from public/javascripts/vendor/bootstrap/bootstrap-transition.js
rename to vendor/assets/javascripts/bootstrap/bootstrap-transition.js
diff --git a/public/javascripts/vendor/bootstrap/bootstrap-twipsy.js b/vendor/assets/javascripts/bootstrap/bootstrap-twipsy.js
similarity index 100%
rename from public/javascripts/vendor/bootstrap/bootstrap-twipsy.js
rename to vendor/assets/javascripts/bootstrap/bootstrap-twipsy.js
diff --git a/public/javascripts/vendor/facebox.js b/vendor/assets/javascripts/facebox.js
similarity index 100%
rename from public/javascripts/vendor/facebox.js
rename to vendor/assets/javascripts/facebox.js
diff --git a/public/javascripts/fileuploader-custom.js b/vendor/assets/javascripts/fileuploader-custom.js
similarity index 100%
rename from public/javascripts/fileuploader-custom.js
rename to vendor/assets/javascripts/fileuploader-custom.js
diff --git a/public/javascripts/vendor/handlebars-1.0.0.beta.6.js b/vendor/assets/javascripts/handlebars-1.0.0.beta.6.js
similarity index 100%
rename from public/javascripts/vendor/handlebars-1.0.0.beta.6.js
rename to vendor/assets/javascripts/handlebars-1.0.0.beta.6.js
diff --git a/public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js b/vendor/assets/javascripts/jquery-ui-1.8.9.custom.min.js
similarity index 100%
rename from public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js
rename to vendor/assets/javascripts/jquery-ui-1.8.9.custom.min.js
diff --git a/public/javascripts/vendor/jquery.autoSuggest.custom.js b/vendor/assets/javascripts/jquery.autoSuggest.custom.js
similarity index 92%
rename from public/javascripts/vendor/jquery.autoSuggest.custom.js
rename to vendor/assets/javascripts/jquery.autoSuggest.custom.js
index bafd35cbcf6fba76827a4d07aba86d0029f12fa1..4ab1f3ec44bb80e1ea76c05e3e1ff7e0c3841c3a 100644
--- a/public/javascripts/vendor/jquery.autoSuggest.custom.js
+++ b/vendor/assets/javascripts/jquery.autoSuggest.custom.js
@@ -11,7 +11,7 @@
  * the fly. It supports keybord navigation (UP + DOWN + RETURN), as well
  * as multiple AutoSuggest fields on the same page.
  *
- * Inspied by the Autocomplete plugin by: Jšrn Zaefferer
+ * Inspied by the Autocomplete plugin by: Jšrn Zaefferer
  * and the Facelist plugin by: Ian Tearle (iantearle.com)
  *
  * This AutoSuggest jQuery plug-in is dual licensed under the MIT and GPL licenses:
@@ -21,7 +21,7 @@
 
 (function($){
 	$.fn.autoSuggest = function(data, options) {
-		var defaults = { 
+		var defaults = {
 			asHtmlID: false,
 			startText: "Enter Name Here",
 			emptyText: "No Results Found",
@@ -49,9 +49,9 @@
 		  	retrieveComplete: function(data){ return data; },
 		  	resultClick: function(data){},
 		  	resultsComplete: function(){}
-	  	};  
-	 	var opts = $.extend(defaults, options);	 	
-		
+	  	};
+	 	var opts = $.extend(defaults, options);
+
 		var d_type = "object";
 		var d_count = 0;
 		if(typeof data == "string") {
@@ -74,23 +74,23 @@
 				var input = $(this);
 				input.attr("autocomplete","off").addClass("as-input").attr("id",x_id).val(opts.startText);
 				var input_focus = false;
-				
+
 				// Setup basic elements and render them to the DOM
 				input.wrap('<ul class="as-selections" id="as-selections-'+x+'"></ul>').wrap('<li class="as-original" id="as-original-'+x+'"></li>');
 				var selections_holder = $("#as-selections-"+x);
-				var org_li = $("#as-original-"+x);				
+				var org_li = $("#as-original-"+x);
 				var results_holder = $('<div class="as-results" id="as-results-'+x+'"></div>').hide();
 				var results_ul =  $('<ul class="as-list"></ul>');
 				var values_input = $('<input type="hidden" class="as-values" name="'+x+'" id="as-values-'+x+'" />');
 				var prefill_value = "";
 				if(typeof opts.preFill == "string"){
-					var vals = opts.preFill.split(",");					
+					var vals = opts.preFill.split(",");
 					for(var i=0; i < vals.length; i++){
 						var v_data = {};
 						v_data[opts.selectedValuesProp] = vals[i];
 						if(vals[i] != ""){
-							add_selected_item(v_data, "000"+i);	
-						}		
+							add_selected_item(v_data, "000"+i);
+						}
 					}
 					prefill_value = opts.preFill;
 				} else {
@@ -103,8 +103,8 @@
 							if(new_v == undefined){ new_v = ""; }
 							prefill_value = prefill_value+new_v+",";
 							if(new_v != ""){
-								add_selected_item(opts.preFill[i], "000"+i);	
-							}		
+								add_selected_item(opts.preFill[i], "000"+i);
+							}
 						}
 					}
 				}
@@ -119,15 +119,15 @@
 				selections_holder.click(function(){
 					input_focus = true;
 					input.focus();
-				}).mousedown(function(){ input_focus = false; }).after(results_holder);	
+				}).mousedown(function(){ input_focus = false; }).after(results_holder);
 
 				var timeout = null;
 				var prev = "";
 				var totalSelections = 0;
 				var tab_press = false;
-				
+
 				// Handle input field events
-				input.focus(function(){			
+				input.focus(function(){
 					if($(this).val() == opts.startText && values_input.val() == ""){
 						$(this).val("");
 					} else if(input_focus){
@@ -145,7 +145,7 @@
 					} else if(input_focus){
 						$("li.as-selection-item", selections_holder).addClass("blur").removeClass("selected");
 						results_holder.hide();
-					}				
+					}
 				}).keydown(function(e) {
 					// track last key pressed
 					lastKeyPressCode = e.keyCode;
@@ -160,7 +160,7 @@
 							moveSelection("down");
 							break;
 						case 8:  // delete
-							if(input.val() == ""){							
+							if(input.val() == ""){
 								var last = values_input.val().split(",");
 								last = last[last.length - 2];
 								selections_holder.children().not(org_li.prev()).removeClass("selected");
@@ -169,7 +169,7 @@
 									opts.selectionRemoved.call(this, org_li.prev());
 								} else {
 									opts.selectionClick.call(this, org_li.prev());
-									org_li.prev().addClass("selected");		
+									org_li.prev().addClass("selected");
 								}
 							}
 							if(input.val().length == 1){
@@ -184,11 +184,11 @@
 						/*case 9: case 188:  // tab or comma
 							tab_press = true;
 							var i_input = input.val().replace(/(,)/g, "");
-							if(i_input != "" && values_input.val().search(","+i_input+",") < 0 && i_input.length >= opts.minChars){	
+							if(i_input != "" && values_input.val().search(","+i_input+",") < 0 && i_input.length >= opts.minChars){
 								e.preventDefault();
 								var n_data = {};
 								n_data[opts.selectedItemProp] = i_input;
-								n_data[opts.selectedValuesProp] = i_input;																				
+								n_data[opts.selectedValuesProp] = i_input;
 								var lis = $("li", selections_holder).length;
 								add_selected_item(n_data, "00"+(lis+1));
 								input.val("");
@@ -221,7 +221,7 @@
 							break;
 					}
 				});
-				
+
 				function keyChange() {
 					// ignore if the following keys are pressed: [del] [shift] [capslock]
 					if( lastKeyPressCode == 46 || (lastKeyPressCode > 8 && lastKeyPressCode < 32) ){ return results_holder.hide(); }
@@ -238,11 +238,11 @@
 							if(opts.beforeRetrieve){
 								string = opts.beforeRetrieve.call(this, string);
 							}
-							$.getJSON(req_string+"?"+opts.queryParam+"="+encodeURIComponent(string)+limit+opts.extraParams, function(data){ 
+							$.getJSON(req_string+"?"+opts.queryParam+"="+encodeURIComponent(string)+limit+opts.extraParams, function(data){
 								d_count = 0;
 								var new_data = opts.retrieveComplete.call(this, data);
 								for (k in new_data) if (new_data.hasOwnProperty(k)) d_count++;
-								processData(new_data, string); 
+								processData(new_data, string);
 							});
 						} else {
 							if(opts.beforeRetrieve){
@@ -260,13 +260,13 @@
 					if (!opts.matchCase){ query = query.toLowerCase(); }
 					var matchCount = 0;
 					results_holder.html(results_ul.html("")).hide();
-					for(var i=0;i<d_count;i++){				
+					for(var i=0;i<d_count;i++){
 						var num = i;
 						num_count++;
 						var forward = false;
 						if(opts.searchObjProps == "value") {
 							var str = data[num].value;
-						} else {	
+						} else {
 							var str = "";
 							var names = opts.searchObjProps.split(",");
 							for(var y=0;y<names.length;y++){
@@ -275,10 +275,10 @@
 							}
 						}
 						if(str){
-							if (!opts.matchCase){ str = str.toLowerCase(); }				
+							if (!opts.matchCase){ str = str.toLowerCase(); }
 							if(str.search(query) != -1 && values_input.val().search(","+data[num][opts.selectedValuesProp]+",") == -1){
 								forward = true;
-							}	
+							}
 						}
 						if(forward){
 							var formatted = $('<li class="as-result-item" id="as-result-item-'+num+'"></li>').click(function(){
@@ -298,19 +298,19 @@
 									$(this).addClass("active");
 								}).data("data",{attributes: data[num], num: num_count});
 							var this_data = $.extend({},data[num]);
-							if (!opts.matchCase){ 
+							if (!opts.matchCase){
 								var regx = new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + query + ")(?![^<>]*>)(?![^&;]+;)", "gi");
 							} else {
 								var regx = new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + query + ")(?![^<>]*>)(?![^&;]+;)", "g");
 							}
-							
+
 							if(opts.resultsHighlight){
 								this_data[opts.selectedItemProp] = this_data[opts.selectedItemProp].replace(regx,"<em>$1</em>");
 							}
 							if(!opts.formatList){
 								formatted = formatted.html(this_data[opts.selectedItemProp]);
 							} else {
-								formatted = opts.formatList.call(this, this_data, formatted);	
+								formatted = opts.formatList.call(this, this_data, formatted);
 							}
 							results_ul.append(formatted);
 							delete this_data;
@@ -326,7 +326,7 @@
 					results_holder.show();
 					opts.resultsComplete.call(this);
 				}
-				
+
 				function add_selected_item(data, num){
 					values_input.val(values_input.val()+data[opts.selectedValuesProp]+",");
 					var item = $('<li class="as-selection-item" id="as-selection-'+num+'"></li>').click(function(){
@@ -342,9 +342,9 @@
 							return false;
 						});
 					org_li.before(item.html(data[opts.selectedItemProp]).prepend(close));
-					opts.selectionAdded.call(this, org_li.prev());	
+					opts.selectionAdded.call(this, org_li.prev());
 				}
-				
+
 				function moveSelection(direction){
 					if($(":visible",results_holder).length > 0){
 						var lis = $("li", results_holder);
@@ -352,20 +352,20 @@
 							var start = lis.eq(0);
 						} else {
 							var start = lis.filter(":last");
-						}					
+						}
 						var active = $("li.active:first", results_holder);
 						if(active.length > 0){
 							if(direction == "down"){
 							start = active.next();
 							} else {
 								start = active.prev();
-							}	
+							}
 						}
 						lis.removeClass("active");
 						start.addClass("active");
 					}
 				}
-									
+
 			});
 		}
 	}
diff --git a/public/javascripts/jquery.autocomplete-custom.js b/vendor/assets/javascripts/jquery.autocomplete-custom.js
similarity index 100%
rename from public/javascripts/jquery.autocomplete-custom.js
rename to vendor/assets/javascripts/jquery.autocomplete-custom.js
diff --git a/public/javascripts/vendor/jquery.autoresize.js b/vendor/assets/javascripts/jquery.autoresize.js
similarity index 100%
rename from public/javascripts/vendor/jquery.autoresize.js
rename to vendor/assets/javascripts/jquery.autoresize.js
diff --git a/public/javascripts/vendor/jquery.charcount.js b/vendor/assets/javascripts/jquery.charcount.js
similarity index 100%
rename from public/javascripts/vendor/jquery.charcount.js
rename to vendor/assets/javascripts/jquery.charcount.js
diff --git a/public/javascripts/vendor/jquery.elastic.js b/vendor/assets/javascripts/jquery.elastic.js
similarity index 100%
rename from public/javascripts/vendor/jquery.elastic.js
rename to vendor/assets/javascripts/jquery.elastic.js
diff --git a/public/javascripts/vendor/jquery.events.input.js b/vendor/assets/javascripts/jquery.events.input.js
similarity index 100%
rename from public/javascripts/vendor/jquery.events.input.js
rename to vendor/assets/javascripts/jquery.events.input.js
diff --git a/public/javascripts/vendor/jquery.hotkeys.js b/vendor/assets/javascripts/jquery.hotkeys.js
similarity index 100%
rename from public/javascripts/vendor/jquery.hotkeys.js
rename to vendor/assets/javascripts/jquery.hotkeys.js
diff --git a/public/javascripts/vendor/jquery.idle-timer.js b/vendor/assets/javascripts/jquery.idle-timer.js
similarity index 100%
rename from public/javascripts/vendor/jquery.idle-timer.js
rename to vendor/assets/javascripts/jquery.idle-timer.js
diff --git a/public/javascripts/jquery.infinitescroll-custom.js b/vendor/assets/javascripts/jquery.infinitescroll-custom.js
similarity index 100%
rename from public/javascripts/jquery.infinitescroll-custom.js
rename to vendor/assets/javascripts/jquery.infinitescroll-custom.js
diff --git a/public/javascripts/vendor/jquery.mentionsInput.js b/vendor/assets/javascripts/jquery.mentionsInput.js
similarity index 100%
rename from public/javascripts/vendor/jquery.mentionsInput.js
rename to vendor/assets/javascripts/jquery.mentionsInput.js
diff --git a/public/javascripts/vendor/jquery.placeholder.js b/vendor/assets/javascripts/jquery.placeholder.js
similarity index 100%
rename from public/javascripts/vendor/jquery.placeholder.js
rename to vendor/assets/javascripts/jquery.placeholder.js
diff --git a/public/javascripts/vendor/jquery.textchange.min.js b/vendor/assets/javascripts/jquery.textchange.min.js
similarity index 100%
rename from public/javascripts/vendor/jquery.textchange.min.js
rename to vendor/assets/javascripts/jquery.textchange.min.js
diff --git a/public/javascripts/keycodes.js b/vendor/assets/javascripts/keycodes.js
similarity index 100%
rename from public/javascripts/keycodes.js
rename to vendor/assets/javascripts/keycodes.js
diff --git a/public/javascripts/vendor/mailchimp/jquery.form.js b/vendor/assets/javascripts/mailchimp/jquery.form.js
similarity index 100%
rename from public/javascripts/vendor/mailchimp/jquery.form.js
rename to vendor/assets/javascripts/mailchimp/jquery.form.js
diff --git a/public/javascripts/vendor/mailchimp/jquery.validate.js b/vendor/assets/javascripts/mailchimp/jquery.validate.js
similarity index 100%
rename from public/javascripts/vendor/mailchimp/jquery.validate.js
rename to vendor/assets/javascripts/mailchimp/jquery.validate.js
diff --git a/public/javascripts/vendor/mailchimp/jquery126.min.js b/vendor/assets/javascripts/mailchimp/jquery126.min.js
similarity index 100%
rename from public/javascripts/vendor/mailchimp/jquery126.min.js
rename to vendor/assets/javascripts/mailchimp/jquery126.min.js
diff --git a/vendor/assets/javascripts/markdown.js b/vendor/assets/javascripts/markdown.js
new file mode 100644
index 0000000000000000000000000000000000000000..88dd96256e996b2665545daf64c85b95722ca406
--- /dev/null
+++ b/vendor/assets/javascripts/markdown.js
@@ -0,0 +1 @@
+//= require_tree ./markdown
\ No newline at end of file
diff --git a/public/javascripts/vendor/markdown/Markdown.Converter.js b/vendor/assets/javascripts/markdown/Markdown.Converter.js
similarity index 100%
rename from public/javascripts/vendor/markdown/Markdown.Converter.js
rename to vendor/assets/javascripts/markdown/Markdown.Converter.js
diff --git a/public/javascripts/vendor/markdown/Markdown.Sanitizer.js b/vendor/assets/javascripts/markdown/Markdown.Sanitizer.js
similarity index 100%
rename from public/javascripts/vendor/markdown/Markdown.Sanitizer.js
rename to vendor/assets/javascripts/markdown/Markdown.Sanitizer.js
diff --git a/public/javascripts/vendor/mbp-helper.js b/vendor/assets/javascripts/mbp-helper.js
similarity index 100%
rename from public/javascripts/vendor/mbp-helper.js
rename to vendor/assets/javascripts/mbp-helper.js
diff --git a/public/javascripts/rails.validations.js b/vendor/assets/javascripts/rails.validations.js
similarity index 100%
rename from public/javascripts/rails.validations.js
rename to vendor/assets/javascripts/rails.validations.js
diff --git a/public/javascripts/vendor/timeago.js b/vendor/assets/javascripts/timeago.js
similarity index 100%
rename from public/javascripts/vendor/timeago.js
rename to vendor/assets/javascripts/timeago.js
diff --git a/public/javascripts/vendor/underscore.js b/vendor/assets/javascripts/underscore.js
similarity index 100%
rename from public/javascripts/vendor/underscore.js
rename to vendor/assets/javascripts/underscore.js