Added SETF; fixed a lot of bugs