Reorganized classes, removed IProvider, minor bug fixes and Model* implementation.