LPS-35593

Hey Mccann,

Hugo asked me to send this directly to Sergio, but I think it would be good for you to take a glance at it. A handful of changes here and there. Afterwards, you can send it straight to Sergio! Here is the link to the previous pull: https://github.com/sergiogonzalez/liferay-portal/pull/998