Rearranged the code a bit ;), added commenting system for the test database setup