s4 map implementation, ready for cleanup