Improved API
Fixed bug where removing layer didn't remove legend
Added API for initialization and destruction of layer and source
Merge remote-tracking branch 'origin/127_fix_legend'

* origin/127_fix_legend:
  Added API for initialization and destruction of layer and source
  Fixed bug where removing layer didn't remove legend
  Improved API