created State class
passed state to createImage instead of all vars
refactoring
formatting
typo
adjusted colors