Unary ops

I haven't been able to test that change locally due to pgsql issues, so I'd welcome any feedback.