Fixed some more issues and finished exercise. Some more tests are still necessary