Some clean up and commenting