Separate drawing code to visualization class.