Some more minor changes towards speed.
Removing some old cruft from file, inlining things.