Updated backend util to be classes for easier extension