Adds square method and tests.
Writes more tests.