I was going to mention that Mavericks is still available on the App Store -- but it's not now. I know within the last two months it was. Maybe with El Capitan coming out they have changed the support policy to only Yosemite.
In any case, have you tried deleting the partition as z31fanatic told me above had to be done to get the original OS back on the machine?
By deleting the partition, do you mean wiping the whole hard drive?
That's what I've done. In Disk Utility I wiped the whole SSD by creating one new partition called Macintosh SSD which used all the space.
Or is there another way to do it?