changed polling to 60 seconds. Cleaned up coding style (everything's now either a class or a function). Took out some debugging output