Cleaned up comments, some new helper methods

No functional changes.