Basic types

Move types without heavy dependencies into separate module basic.

Editorial: fix line endings of errors.py, missed that in the last PR.