Trimmed unused stuff from structcode.cpp