Closures and function parameters fixes

Fixes #43 

This pull request clarifies and fixes how function parameters and closure captures are being dealt with. They are now proper constant references.

This also introduces clarifications in compilation error messages.