removed locks
added ?next api
cleanup thread; index configurable size