Implement screen clearing assembler replacement.
Also remove some unused functions.