Atomic get&clear pushback for lexer.  Also add type signatures to lexer
and clean up indentation.