Remove repeated imports and import of math

Closes #62