Cleaned up admin.html and index.php
Updated sql functions.