Comments and sql fixes