Got function inlining to work partially