Fixed all issues mentioned on Github's pull request as of now.