Moved all rails code to main folder