Some additional profiling and optimizeation