Added preprocessor switch for styles

Along with a little bit of refactoring