style changes and removed unused code