More efficiency improvements.

Using direct assignment over push() for performance reasons. Got rid of
the splicing and used shift + direct assignment. Still can't handle
larger maps.