refactor code to improve performance
Fix a bug that wrong label color when new project was created
Fix the bug that category doesn't switch when current project is switched