Move utility functions to the top, add comments
already have the repo url :/