Removed uneeded code and updated tests