docblock fixed, small optimizations