generate map file for yacc build
correct prototypes
free unused memory