Refactored application