WIP: added some optimisation flags to release builds
WIP
Added the profiling options
merge master into snapSkeleton