removed inlining, small tweaks