Stripped out some unnecessary code