code cleaning

- tidied up code
- simplified definition of accent color