Fixes memeory problems.
Moves some actions from drawRect to setFrame.