AI fails at refactoring

Planted
Last tended

Rather than put things into separate, appropriate files, it has a tendency to append stuff onto one large file.