Merge pull request #293 from keithcom/encoders

Add support for sparsity normalization
Update all asserts to be consistant with the unittest framework