working out higher level concepts; code tweaks for performance; miscellaneous