Error gen and messages

resolves #1