get rid of more unused constants and add some documentation.
make the test more robust
fix #34. Ascending order always return null for columns that have a null value