Numerous bug fixes
Bug fixes; add spec translator