#88 - fixed depreciated methods and refactoring