Cleaned up Main, added image resizing