Added a bunch of test cases to prevent bugs