Latest changes clean up code