Added comments, cleaned up for submission