Implemented inlining / byref policy, general cleanup