Moved API view helper functions in separate module