Cleaned up functions/comments

Fixes #20