mapsharing implementation with new code base

Code works fine, please pull before the code changes! D:
I still have to figure out how to implement the locks in the map saving with the new code, if someone could help me I'd be happy ^^