Big overhaul to bring code inline with development style and workflow