Refactor class Repository + class Command