Refactored input and output resolution.