Put API back into documentation

Goes towards #76
Documented code and formatted for flake8

Contributes to #75 and #76
Cleaned up indenting, flake8, deprecated, doc
Fixed old import line
Explicitly call np.pi for value of pi