minor performance tweaks, removed some cruft.