Fixed gregs mistakes
Fixed merge confilcts