Refactor to remove appcommon dependencies on webcommon.

Fix some remaining compilation issues.