Simplify attributes and type casting