Get rid of the javascript
New approach using active record models
Got rid of everything and restructured it around cms page concept. It seems to be working OK, for a draft