Added ability to ensure app pool is removed, tests to cover the new code