restored project after Pere's editing. It run into weird problems concerning permissions on /tmp
updated test commands to test the queries separately