start restructuring as a rails app. old code can be found in public/oldproject.