current functionality improved

- changed determination of portal id in createPortal
- replaced some global lists by function calls