Removed some dependencies. Changed variables to be more obvious.