Code style cleanup and remove trait usage