Moved structures and functions around