NeuralLM refactoring.