restructure library structure to prevent breakage in rails apps