Refactor adding methods in ast.rkt