interface: major cleanup of the main interface code