Slight cleanup and removal of unused code.