Fix require statements; pull helper methods into class scope