Switch from PHP/MySQL to JS

Refactored main.html to use script.js instead of inline PHP, removed
MySQL DB. Extended class functionality.