Fix some injection errors. Refactor.