cleaning up rails codebase