Remove unused, redundant and duplicated declaration variables
Clean createLayergroup
Remove layer check metric as it is no so important right now
Move getTileOrGrid to MapBackend