Added basic routines for drawing frames.