Remove "cast" usage. Fixes #20.