Cleaned up functions/comments

Fixes #17