[minor] Cleaned up square-root code, refactored tests
Added numerical quadrature