move custom classes out of mapx

and some other stuff