Fix: better tests and management command.