code clean up, last changes for XE16