Test runner, etc

Added lib/dir, added test runner, moved tests etc.