Added MSpec and unit tests