cleanup api module, add monitoring