Moved controller logic into service object