Improved scripts from Liferay experience