moved some stuff from Player to main and generalized image loading/handling process