Minor re-factoring of codebase.