Move proc allocs to dedicated function.