Make it Rails

This is quite a dramatic PR. It resolves #35, converting the project to Rails for the reasons outlined in that Issue.