religious fanaticism was as serious a danger to religious liberty as excessive state authority according to james madison , primary author of the us constitution , and as afellay knew morocco was a long way from the democracy of the us .