Fix warnings

[Closes #463]
Convert to expect syntax