AJAX & DB updates

Finished up and tested. Lots of updates to AJAX and database updates as well as checks for files.