Fixed bugs in mesh generation
Removed profiler stuff