revamped main loop
Merge branch 'master' of https://github.com/rbenua/rejpeg