2nd commit/functional parts refactored/remaining: output formatting