#1 #2 initial code based on geomajas-profiling with api/core split