Major refactor of the code

Split into a file for each table, containing the Create, Retrieve,
Update and Delete functions (CRUD). Also, created separate unit test
file for each table (more work still to do on this). Finally, added
main.php, which creates database from scratch and runs these tests.