Cleaned up and annotated