Fixed notebooks

- Fixed notebooks
- Consolidated some examples
- Pulled commonly used functions into util/rates.py
- PEP 8