Removed resize() to fix infinite recursion.  Moved functionality into init().