Fixed  #2, some clean up