extract runtime utilities to separate classes