Remove test files from root dir
Move test code where it belongs