refacttor: whitespace and make image loaded call optional.