Update for use as a gem