Add testing infrastructure

#29 should be merged first