Move plotting code to graphics, mode methods to base