Master code with min functionality updated and restructured with utility classes / methods.