clearCode() should clear code