Extract boilerplate methods to file