Version bump to 0.5, added gem, bugfixes and simplifications.