Did some cleanup and commenting