add indexes, remove sorting, include default limit
little tweaks
fixes
Merge pull request #2 from andyet/optimize

Optimize