Display now only redraws images that have mooved instead of redrawing everything. Refactored a few things including proper main function.