Clean up, remove unnecessary code, comment a bit