Optimize Base#merge() to not use Base#each()
Various clean-ups regarding the handling of activeLayer, JSON deserialization, DOM insertion and and layer reusing.

JSON deserialization does no longer insert items into DOM twice now, and should therefore be faster.