more tests.
- more tests
- removed unneded switch statement
set constants in xs.