Almost done for final commit. I just have to clean stuff, get working database queries and handle command line argument parsing