Finished all the tests. Made some minor correction to make all the tests work