refactor package structure preparing extensions.