Various little changes.

1) Cleaned up utility functions.
2) Separated utility functions into reusable sections and into a separate header.
3) Removed a comment that no longer applied.