reverse show order of portals
using MAX_PORTAL_LEVEL now for array
changed table layout to be more compact
cleaned up code