modernize style a little, add environ, remove autotest in favor of using something like reflex