Cleaned it up; added comments