cleanup semicolons, whitespace and mutable default arguments
fix args, kwargs which were broken with #310. this is essentially the same but working