added remaining features; tweaked various things
removed some cruft