Reverted deletion of add method.
Changed getContentRect() from a function to an obviously imperative subroutine.
As it was a function with side effects.