Move the function from within the function def to outside, to no longer depend
on function level scope values and instead pass the arguments
explicitly.
* enable to set a function to entry option
* add tests for entry function
* fix style
* fix identifier and readableIdentifier of MultiModule
* use arrow functions
* use arrow function
* remove incorrect new operators
* fix Validation tests