converted project to gradle and code clean up