Outsource some stuff to helper file