Improved the .gitignore file and fixed a small issue with the SwitchState