Added lots of comments so I can continue (and re-write everything) tomorrow.