Rails Best Practices fixes

Adds useful indexes for word markings
Removes trailing whitespace
Fixes formatting issues
Merge branch 'develop'