Moyes gets three-year EPL deal at West Ham