changed docs, almost finished length-zero tests, fixed bugs