fixing the image/text being struck when it reached the end of canvas + general cleanup