Fixed small bugs in demo app.

Fixed a few small bugs related to the demo buttons up top. Also,
replaced all references directly to instance variables with self.ivar
instead. After reading up on it, found that it is a safer way to do it
so that it always calls the getter/setter method in case you were to
override it later.