Code cleanup in interfaces and mainbus