Code almost completely commented