Replaced hard coded switches with Bertrands new defines