changed the DrawingDevice to use a for loop and supressed some compiler warnings