Some code re-factory for the coming changes

Rename some structures.