engine: Fix inlines, cleanup