Required changes to build a gem, some fixes.