[Refactor] moved around some functions + made 'CUStyleData' global (for minor perf gains)