Implement REM and CLEAR