Some changes to the code to make it compile without oauth