Added tests, fixed code to pass them