fix many warnings and markup errors