Removed unused define class; Pulled defin pattern into preprocessor