last commit was useless. anyways. implemented code generation for applic,
without the error that supposed to be thrown from wrong function arg.

also, I repaired various issues that I found