Change database library from persistent to postgresql-simple. Seperate tests from actual app. Reorganise project files.