removing extra canvas styles
clearing up some variable scope bugs that occurred during reorganization of code