changed all dict() calls to {}
code cleanup: mostly removed some unused imports
fixed: there is no numpy.math