remove trailing whitespace
add builtin functions (not yet tested)