Added more tests and cleaned the file up