convert globals to modules, add twitt example