Major update with a lot of fixes adopted from UWAP deployment.