Refactored compiler class