Simplify codes