(Misc) Fix line ending for all files
(misc) Fix var declaration in some procedures/functions/actions

As explained in issue #10, all CAL actors should declare local
variables only in a 'var' block and not anymore in the first
statements of the body