make AST in render local again &
remove unused function & superfluous comments