Added tests, finished first iteration