PortalKit: refactor the most java services