some additional cleanup and removal of superfluous code.