Many improvements. Files prepared for package development.