Rewrote a large chunk to use OAuth