First go at performance refactor. Most unit tests working, some have to be removed to compile (need to get things up to spec as far as new patches) PR: Obtained from: Submitted by: Reviewed by: