Restructured a bit in preparation for using backbone.js (or not?)