Map layer functionality

Further work on map layers