Slight optimization + more profiling