Refactor visualization program (cleanup and better comments)