Added rails and changed structure