Added comments, cleanup