Cleaning up

Making code easier to read, more comments.