Added some debug outputs, fixed operators.