Fixed bugs in subset 1, completed subset 2 and wrote a test file