Refactored moved production code to its own class