Source clean up

-inlining all function that are only called once
-sei/cli without memory barrier
- size optimizations