Made various performance optimizations, profiling now only shows
Solved merge conflicts