aitodo

Resolve tasks described in `AITODO` comments by implementing the required code changes and removing the comments.