AI server: miscellaneous cleanup