Moved functionality from static methods to class