Added new build parameters. Code refactoring.
Nit changes.