Minor optimizations, moved TODOs to Issues in GitHub.