Switched testing to CTest and libcheck, fixed a few bugs in Types