import fixes and ANSI constants.