Various fixes following Jason comments