Removed unnecessary listener and added more tests