Added square and cube function, added documentation for internal values