Extract functions, more tooling