WIP: split code types.

I can add this to a different PR if you'd like.