Target color format is now gotten from user preferences.
minor refactoring (deleted unused fields and imports).