api doc and css changes plus genericizing of sort stuff