Added direction field to tool

Also a number of whitespace clean up per pep8