Added checks for validation and manipulation.