cleaned up some on the code