Improved api module configuration