minor performance tweaks
major performance tweaks
typos and additional comments