remove self module on function calls
add remove_recursive utility function