Make phi standalone class so it can use slots
Add more __slots__
Simplify expressions for float/long comparison and int negation