Added database functions.
Added AJAX code.
Handling POST data and more requests.
Cleanup.