Finished making everything work, added testcases