Cleanup of the sidebar toggle code using an enum
Small bugfix for the las commit (sidebar toggle cleanup
Fixed a bug where a line wasn't drawn due to an error