Fix for clearing objects at borders by changing Bresenham line algorithm

and some formatting..