Add initial unit loading code.

Still work in progress and experimental as hell.