Sparsemodel

Add basic support for sparse models.