Fixes to ampresand and classes id's and a couple of bugs