Fix double declaration
Avoid useless warning if pyrpose was not provided
Fortify against missing purpose