Remove unnecessary concatenation
Simplify checkcodes implementation