Refactor code to support OAtuh.io - work web