some improvements for rails best practices
style fixes