Refactored code to rationalized package structure