Modified .gitignore to exclude IntelliJ configuration.
Code cleanup and reformatting.
Added get_authorization method which can be used to do synchronous requests for authorization.