c-attitude: move module functions to class