added tests for invalid location, cleanup