Optimizations

Moved more things to inline header