Started major reorg

New semi-object-oriented approach to the javascript
More information in database
Progress made towards removing all page refreshes with ajax
login works