Add bounds checking, implement fillrect