More re-factor for higher degree of code reuse.