Refactored console