Refactor, readfilehelper, primitive AI tuning.