Working code for square roots. Requires tests to be added