Fix warnings
Convert to expect syntax