Remove unnecessary nested attributes