Fix for issue #80

removing deprecated function calls and replacing with future friendly code.