Fix #3, fix issues with duplicate images being loaded, and other little improvements