cleaned up a little bit of the code.