Added some graphics code. pretty incomplete at the moment though