Refactored crud (code quality)