Fixed compatability and other small bugs in twitter api helper code