Added comments and more graphics functions