Fixes #1, adds additional comments to utility functions.