cleanup code
move perl tests to correct directory layout