hilo AI done - needs refactoring