Code refactor and adjustment to visualization based on input from demo