LPS-50049 Refactor portal-impl pt.2
LPS-50049 Split creation to ensure proper close
LPS-50049 Source formatting