Added a lot of overall functionality and cleaned up.
Merge remote-tracking branch 'origin/master'