Improved tips code and changed debug mode