Changed slice to map, finished basic protocol.