Some refactoring to lessen dependencies of the WebApi module, Unittests added to postbuild event