several fixes and new features

O hai, 

it's a bunch of features and fixes I've had to add while working on this codebase in last several months