First pass complete

Mostly adjusted Mathias's to suit my needs, brought some of Paul's changes in