Terrible looking but functional map loader + snapshot function