Finished incorporating Jesse's changes.
A few style changes to make things look nicer.