SoO mapid; cleanup
rework some code