Cleanup:
  - indenting is now 4 spaces
  - moved contents from console.py to tools.py
More cleanup.