Fixes for Auxiliary Functions?

Also, started commenting each function's purpose above it.