Cleaned code, modified urls and aded @links in OAuth config

Cleaned code.
Also see comments