Pretties up the code, adds comments, etc.