Using a custom class to handle trait options