Cleaning up and updating tests