refactoring and bug fixes, added retrofit and okhttp for http requests