Replaced deprecated and outdated code.
Merge pull request #25 from juho-jaakkola/deprecated_in_19

Replaced deprecated and outdated code.