[ticket/416] Improve portal module and modify tests

B3P-416