Move class BType to separate component

This commit does not build, it just moves the class BCode,
refactorings are in a separate commit to simplify reviewing.