cleanup
parse blocks and function calls