Added errors.py, fixed some notation