diff --git a/lib/approx_nat.cpp b/src/util/approx_nat.cpp similarity index 100% rename from lib/approx_nat.cpp rename to src/util/approx_nat.cpp diff --git a/lib/approx_nat.h b/src/util/approx_nat.h similarity index 100% rename from lib/approx_nat.h rename to src/util/approx_nat.h diff --git a/lib/approx_set.cpp b/src/util/approx_set.cpp similarity index 100% rename from lib/approx_set.cpp rename to src/util/approx_set.cpp diff --git a/lib/approx_set.h b/src/util/approx_set.h similarity index 100% rename from lib/approx_set.h rename to src/util/approx_set.h diff --git a/lib/array.h b/src/util/array.h similarity index 100% rename from lib/array.h rename to src/util/array.h diff --git a/lib/array_map.h b/src/util/array_map.h similarity index 100% rename from lib/array_map.h rename to src/util/array_map.h diff --git a/lib/backtrackable_set.h b/src/util/backtrackable_set.h similarity index 100% rename from lib/backtrackable_set.h rename to src/util/backtrackable_set.h diff --git a/lib/basic_interval.h b/src/util/basic_interval.h similarity index 100% rename from lib/basic_interval.h rename to src/util/basic_interval.h diff --git a/lib/bit_util.cpp b/src/util/bit_util.cpp similarity index 100% rename from lib/bit_util.cpp rename to src/util/bit_util.cpp diff --git a/lib/bit_util.h b/src/util/bit_util.h similarity index 100% rename from lib/bit_util.h rename to src/util/bit_util.h diff --git a/lib/bit_vector.cpp b/src/util/bit_vector.cpp similarity index 100% rename from lib/bit_vector.cpp rename to src/util/bit_vector.cpp diff --git a/lib/bit_vector.h b/src/util/bit_vector.h similarity index 100% rename from lib/bit_vector.h rename to src/util/bit_vector.h diff --git a/lib/buffer.h b/src/util/buffer.h similarity index 100% rename from lib/buffer.h rename to src/util/buffer.h diff --git a/lib/cancel_eh.h b/src/util/cancel_eh.h similarity index 100% rename from lib/cancel_eh.h rename to src/util/cancel_eh.h diff --git a/lib/chashtable.h b/src/util/chashtable.h similarity index 100% rename from lib/chashtable.h rename to src/util/chashtable.h diff --git a/lib/critical_flet.h b/src/util/critical_flet.h similarity index 100% rename from lib/critical_flet.h rename to src/util/critical_flet.h diff --git a/lib/debug.cpp b/src/util/debug.cpp similarity index 100% rename from lib/debug.cpp rename to src/util/debug.cpp diff --git a/lib/debug.h b/src/util/debug.h similarity index 100% rename from lib/debug.h rename to src/util/debug.h diff --git a/lib/dec_ref_util.h b/src/util/dec_ref_util.h similarity index 100% rename from lib/dec_ref_util.h rename to src/util/dec_ref_util.h diff --git a/lib/dependency.h b/src/util/dependency.h similarity index 100% rename from lib/dependency.h rename to src/util/dependency.h diff --git a/lib/dictionary.h b/src/util/dictionary.h similarity index 100% rename from lib/dictionary.h rename to src/util/dictionary.h diff --git a/lib/dlist.h b/src/util/dlist.h similarity index 100% rename from lib/dlist.h rename to src/util/dlist.h diff --git a/lib/double_manager.h b/src/util/double_manager.h similarity index 100% rename from lib/double_manager.h rename to src/util/double_manager.h diff --git a/lib/event_handler.h b/src/util/event_handler.h similarity index 100% rename from lib/event_handler.h rename to src/util/event_handler.h diff --git a/lib/ext_gcd.h b/src/util/ext_gcd.h similarity index 100% rename from lib/ext_gcd.h rename to src/util/ext_gcd.h diff --git a/lib/ext_numeral.h b/src/util/ext_numeral.h similarity index 100% rename from lib/ext_numeral.h rename to src/util/ext_numeral.h diff --git a/lib/f2n.h b/src/util/f2n.h similarity index 100% rename from lib/f2n.h rename to src/util/f2n.h diff --git a/lib/fvi.h b/src/util/fvi.h similarity index 100% rename from lib/fvi.h rename to src/util/fvi.h diff --git a/lib/fvi_def.h b/src/util/fvi_def.h similarity index 100% rename from lib/fvi_def.h rename to src/util/fvi_def.h diff --git a/lib/hash.cpp b/src/util/hash.cpp similarity index 100% rename from lib/hash.cpp rename to src/util/hash.cpp diff --git a/lib/hash.h b/src/util/hash.h similarity index 100% rename from lib/hash.h rename to src/util/hash.h diff --git a/lib/hashtable.h b/src/util/hashtable.h similarity index 100% rename from lib/hashtable.h rename to src/util/hashtable.h diff --git a/lib/heap.h b/src/util/heap.h similarity index 100% rename from lib/heap.h rename to src/util/heap.h diff --git a/lib/hwf.cpp b/src/util/hwf.cpp similarity index 100% rename from lib/hwf.cpp rename to src/util/hwf.cpp diff --git a/lib/hwf.h b/src/util/hwf.h similarity index 100% rename from lib/hwf.h rename to src/util/hwf.h diff --git a/lib/id_gen.h b/src/util/id_gen.h similarity index 100% rename from lib/id_gen.h rename to src/util/id_gen.h diff --git a/lib/imdd.cpp b/src/util/imdd.cpp similarity index 100% rename from lib/imdd.cpp rename to src/util/imdd.cpp diff --git a/lib/imdd.h b/src/util/imdd.h similarity index 100% rename from lib/imdd.h rename to src/util/imdd.h diff --git a/lib/inf_int_rational.cpp b/src/util/inf_int_rational.cpp similarity index 100% rename from lib/inf_int_rational.cpp rename to src/util/inf_int_rational.cpp diff --git a/lib/inf_int_rational.h b/src/util/inf_int_rational.h similarity index 100% rename from lib/inf_int_rational.h rename to src/util/inf_int_rational.h diff --git a/lib/inf_rational.cpp b/src/util/inf_rational.cpp similarity index 100% rename from lib/inf_rational.cpp rename to src/util/inf_rational.cpp diff --git a/lib/inf_rational.h b/src/util/inf_rational.h similarity index 100% rename from lib/inf_rational.h rename to src/util/inf_rational.h diff --git a/lib/inf_s_integer.cpp b/src/util/inf_s_integer.cpp similarity index 100% rename from lib/inf_s_integer.cpp rename to src/util/inf_s_integer.cpp diff --git a/lib/inf_s_integer.h b/src/util/inf_s_integer.h similarity index 100% rename from lib/inf_s_integer.h rename to src/util/inf_s_integer.h diff --git a/lib/ini_file.cpp b/src/util/ini_file.cpp similarity index 100% rename from lib/ini_file.cpp rename to src/util/ini_file.cpp diff --git a/lib/ini_file.h b/src/util/ini_file.h similarity index 100% rename from lib/ini_file.h rename to src/util/ini_file.h diff --git a/lib/instruction_count.cpp b/src/util/instruction_count.cpp similarity index 100% rename from lib/instruction_count.cpp rename to src/util/instruction_count.cpp diff --git a/lib/instruction_count.h b/src/util/instruction_count.h similarity index 100% rename from lib/instruction_count.h rename to src/util/instruction_count.h diff --git a/lib/interval.h b/src/util/interval.h similarity index 100% rename from lib/interval.h rename to src/util/interval.h diff --git a/lib/interval_def.h b/src/util/interval_def.h similarity index 100% rename from lib/interval_def.h rename to src/util/interval_def.h diff --git a/lib/interval_skip_list.h b/src/util/interval_skip_list.h similarity index 100% rename from lib/interval_skip_list.h rename to src/util/interval_skip_list.h diff --git a/lib/lbool.cpp b/src/util/lbool.cpp similarity index 100% rename from lib/lbool.cpp rename to src/util/lbool.cpp diff --git a/lib/lbool.h b/src/util/lbool.h similarity index 100% rename from lib/lbool.h rename to src/util/lbool.h diff --git a/lib/list.h b/src/util/list.h similarity index 100% rename from lib/list.h rename to src/util/list.h diff --git a/lib/machine.h b/src/util/machine.h similarity index 100% rename from lib/machine.h rename to src/util/machine.h diff --git a/lib/map.h b/src/util/map.h similarity index 100% rename from lib/map.h rename to src/util/map.h diff --git a/lib/mem_stat.cpp b/src/util/mem_stat.cpp similarity index 100% rename from lib/mem_stat.cpp rename to src/util/mem_stat.cpp diff --git a/lib/mem_stat.h b/src/util/mem_stat.h similarity index 100% rename from lib/mem_stat.h rename to src/util/mem_stat.h diff --git a/lib/memory_manager.cpp b/src/util/memory_manager.cpp similarity index 100% rename from lib/memory_manager.cpp rename to src/util/memory_manager.cpp diff --git a/lib/memory_manager.h b/src/util/memory_manager.h similarity index 100% rename from lib/memory_manager.h rename to src/util/memory_manager.h diff --git a/lib/mpbq.cpp b/src/util/mpbq.cpp similarity index 100% rename from lib/mpbq.cpp rename to src/util/mpbq.cpp diff --git a/lib/mpbq.h b/src/util/mpbq.h similarity index 100% rename from lib/mpbq.h rename to src/util/mpbq.h diff --git a/lib/mpbqi.h b/src/util/mpbqi.h similarity index 100% rename from lib/mpbqi.h rename to src/util/mpbqi.h diff --git a/lib/mpf.cpp b/src/util/mpf.cpp similarity index 100% rename from lib/mpf.cpp rename to src/util/mpf.cpp diff --git a/lib/mpf.h b/src/util/mpf.h similarity index 100% rename from lib/mpf.h rename to src/util/mpf.h diff --git a/lib/mpff.cpp b/src/util/mpff.cpp similarity index 100% rename from lib/mpff.cpp rename to src/util/mpff.cpp diff --git a/lib/mpff.h b/src/util/mpff.h similarity index 100% rename from lib/mpff.h rename to src/util/mpff.h diff --git a/lib/mpfx.cpp b/src/util/mpfx.cpp similarity index 100% rename from lib/mpfx.cpp rename to src/util/mpfx.cpp diff --git a/lib/mpfx.h b/src/util/mpfx.h similarity index 100% rename from lib/mpfx.h rename to src/util/mpfx.h diff --git a/lib/mpn.cpp b/src/util/mpn.cpp similarity index 100% rename from lib/mpn.cpp rename to src/util/mpn.cpp diff --git a/lib/mpn.h b/src/util/mpn.h similarity index 100% rename from lib/mpn.h rename to src/util/mpn.h diff --git a/lib/mpq.cpp b/src/util/mpq.cpp similarity index 100% rename from lib/mpq.cpp rename to src/util/mpq.cpp diff --git a/lib/mpq.h b/src/util/mpq.h similarity index 100% rename from lib/mpq.h rename to src/util/mpq.h diff --git a/lib/mpq_inf.cpp b/src/util/mpq_inf.cpp similarity index 100% rename from lib/mpq_inf.cpp rename to src/util/mpq_inf.cpp diff --git a/lib/mpq_inf.h b/src/util/mpq_inf.h similarity index 100% rename from lib/mpq_inf.h rename to src/util/mpq_inf.h diff --git a/lib/mpz.cpp b/src/util/mpz.cpp similarity index 100% rename from lib/mpz.cpp rename to src/util/mpz.cpp diff --git a/lib/mpz.h b/src/util/mpz.h similarity index 100% rename from lib/mpz.h rename to src/util/mpz.h diff --git a/lib/mpzzp.h b/src/util/mpzzp.h similarity index 100% rename from lib/mpzzp.h rename to src/util/mpzzp.h diff --git a/lib/nat_set.h b/src/util/nat_set.h similarity index 100% rename from lib/nat_set.h rename to src/util/nat_set.h diff --git a/lib/numeral_buffer.h b/src/util/numeral_buffer.h similarity index 100% rename from lib/numeral_buffer.h rename to src/util/numeral_buffer.h diff --git a/lib/obj_hashtable.h b/src/util/obj_hashtable.h similarity index 100% rename from lib/obj_hashtable.h rename to src/util/obj_hashtable.h diff --git a/lib/obj_mark.h b/src/util/obj_mark.h similarity index 100% rename from lib/obj_mark.h rename to src/util/obj_mark.h diff --git a/lib/obj_pair_hashtable.h b/src/util/obj_pair_hashtable.h similarity index 100% rename from lib/obj_pair_hashtable.h rename to src/util/obj_pair_hashtable.h diff --git a/lib/obj_pair_set.h b/src/util/obj_pair_set.h similarity index 100% rename from lib/obj_pair_set.h rename to src/util/obj_pair_set.h diff --git a/lib/obj_ref.h b/src/util/obj_ref.h similarity index 100% rename from lib/obj_ref.h rename to src/util/obj_ref.h diff --git a/lib/obj_triple_hashtable.h b/src/util/obj_triple_hashtable.h similarity index 100% rename from lib/obj_triple_hashtable.h rename to src/util/obj_triple_hashtable.h diff --git a/lib/object_allocator.h b/src/util/object_allocator.h similarity index 100% rename from lib/object_allocator.h rename to src/util/object_allocator.h diff --git a/lib/old_interval.cpp b/src/util/old_interval.cpp similarity index 100% rename from lib/old_interval.cpp rename to src/util/old_interval.cpp diff --git a/lib/old_interval.h b/src/util/old_interval.h similarity index 100% rename from lib/old_interval.h rename to src/util/old_interval.h diff --git a/lib/optional.h b/src/util/optional.h similarity index 100% rename from lib/optional.h rename to src/util/optional.h diff --git a/lib/page.cpp b/src/util/page.cpp similarity index 100% rename from lib/page.cpp rename to src/util/page.cpp diff --git a/lib/page.h b/src/util/page.h similarity index 100% rename from lib/page.h rename to src/util/page.h diff --git a/lib/parray.h b/src/util/parray.h similarity index 100% rename from lib/parray.h rename to src/util/parray.h diff --git a/lib/permutation.cpp b/src/util/permutation.cpp similarity index 100% rename from lib/permutation.cpp rename to src/util/permutation.cpp diff --git a/lib/permutation.h b/src/util/permutation.h similarity index 100% rename from lib/permutation.h rename to src/util/permutation.h diff --git a/lib/pool.h b/src/util/pool.h similarity index 100% rename from lib/pool.h rename to src/util/pool.h diff --git a/lib/pop_scopes.h b/src/util/pop_scopes.h similarity index 100% rename from lib/pop_scopes.h rename to src/util/pop_scopes.h diff --git a/lib/prime_generator.cpp b/src/util/prime_generator.cpp similarity index 100% rename from lib/prime_generator.cpp rename to src/util/prime_generator.cpp diff --git a/lib/prime_generator.h b/src/util/prime_generator.h similarity index 100% rename from lib/prime_generator.h rename to src/util/prime_generator.h diff --git a/lib/ptr_scoped_buffer.h b/src/util/ptr_scoped_buffer.h similarity index 100% rename from lib/ptr_scoped_buffer.h rename to src/util/ptr_scoped_buffer.h diff --git a/lib/rational.cpp b/src/util/rational.cpp similarity index 100% rename from lib/rational.cpp rename to src/util/rational.cpp diff --git a/lib/rational.h b/src/util/rational.h similarity index 100% rename from lib/rational.h rename to src/util/rational.h diff --git a/lib/ref.h b/src/util/ref.h similarity index 100% rename from lib/ref.h rename to src/util/ref.h diff --git a/lib/ref_buffer.h b/src/util/ref_buffer.h similarity index 100% rename from lib/ref_buffer.h rename to src/util/ref_buffer.h diff --git a/lib/ref_util.h b/src/util/ref_util.h similarity index 100% rename from lib/ref_util.h rename to src/util/ref_util.h diff --git a/lib/ref_vector.h b/src/util/ref_vector.h similarity index 100% rename from lib/ref_vector.h rename to src/util/ref_vector.h diff --git a/lib/region.cpp b/src/util/region.cpp similarity index 100% rename from lib/region.cpp rename to src/util/region.cpp diff --git a/lib/region.h b/src/util/region.h similarity index 100% rename from lib/region.h rename to src/util/region.h diff --git a/lib/resource_limit.h b/src/util/resource_limit.h similarity index 100% rename from lib/resource_limit.h rename to src/util/resource_limit.h diff --git a/lib/s_integer.cpp b/src/util/s_integer.cpp similarity index 100% rename from lib/s_integer.cpp rename to src/util/s_integer.cpp diff --git a/lib/s_integer.h b/src/util/s_integer.h similarity index 100% rename from lib/s_integer.h rename to src/util/s_integer.h diff --git a/lib/scoped_ctrl_c.cpp b/src/util/scoped_ctrl_c.cpp similarity index 100% rename from lib/scoped_ctrl_c.cpp rename to src/util/scoped_ctrl_c.cpp diff --git a/lib/scoped_ctrl_c.h b/src/util/scoped_ctrl_c.h similarity index 100% rename from lib/scoped_ctrl_c.h rename to src/util/scoped_ctrl_c.h diff --git a/lib/scoped_numeral.h b/src/util/scoped_numeral.h similarity index 100% rename from lib/scoped_numeral.h rename to src/util/scoped_numeral.h diff --git a/lib/scoped_numeral_buffer.h b/src/util/scoped_numeral_buffer.h similarity index 100% rename from lib/scoped_numeral_buffer.h rename to src/util/scoped_numeral_buffer.h diff --git a/lib/scoped_numeral_vector.h b/src/util/scoped_numeral_vector.h similarity index 100% rename from lib/scoped_numeral_vector.h rename to src/util/scoped_numeral_vector.h diff --git a/lib/scoped_ptr_vector.h b/src/util/scoped_ptr_vector.h similarity index 100% rename from lib/scoped_ptr_vector.h rename to src/util/scoped_ptr_vector.h diff --git a/lib/scoped_timer.cpp b/src/util/scoped_timer.cpp similarity index 100% rename from lib/scoped_timer.cpp rename to src/util/scoped_timer.cpp diff --git a/lib/scoped_timer.h b/src/util/scoped_timer.h similarity index 100% rename from lib/scoped_timer.h rename to src/util/scoped_timer.h diff --git a/lib/sexpr.cpp b/src/util/sexpr.cpp similarity index 100% rename from lib/sexpr.cpp rename to src/util/sexpr.cpp diff --git a/lib/sexpr.h b/src/util/sexpr.h similarity index 100% rename from lib/sexpr.h rename to src/util/sexpr.h diff --git a/lib/small_object_allocator.cpp b/src/util/small_object_allocator.cpp similarity index 100% rename from lib/small_object_allocator.cpp rename to src/util/small_object_allocator.cpp diff --git a/lib/small_object_allocator.h b/src/util/small_object_allocator.h similarity index 100% rename from lib/small_object_allocator.h rename to src/util/small_object_allocator.h diff --git a/lib/stack.cpp b/src/util/stack.cpp similarity index 100% rename from lib/stack.cpp rename to src/util/stack.cpp diff --git a/lib/stack.h b/src/util/stack.h similarity index 100% rename from lib/stack.h rename to src/util/stack.h diff --git a/lib/statistics.cpp b/src/util/statistics.cpp similarity index 100% rename from lib/statistics.cpp rename to src/util/statistics.cpp diff --git a/lib/statistics.h b/src/util/statistics.h similarity index 100% rename from lib/statistics.h rename to src/util/statistics.h diff --git a/lib/stats.h b/src/util/stats.h similarity index 100% rename from lib/stats.h rename to src/util/stats.h diff --git a/lib/stopwatch.h b/src/util/stopwatch.h similarity index 100% rename from lib/stopwatch.h rename to src/util/stopwatch.h diff --git a/lib/str_hashtable.h b/src/util/str_hashtable.h similarity index 100% rename from lib/str_hashtable.h rename to src/util/str_hashtable.h diff --git a/lib/stream_buffer.h b/src/util/stream_buffer.h similarity index 100% rename from lib/stream_buffer.h rename to src/util/stream_buffer.h diff --git a/lib/string_buffer.h b/src/util/string_buffer.h similarity index 100% rename from lib/string_buffer.h rename to src/util/string_buffer.h diff --git a/lib/symbol.cpp b/src/util/symbol.cpp similarity index 100% rename from lib/symbol.cpp rename to src/util/symbol.cpp diff --git a/lib/symbol.h b/src/util/symbol.h similarity index 100% rename from lib/symbol.h rename to src/util/symbol.h diff --git a/lib/symbol_table.h b/src/util/symbol_table.h similarity index 100% rename from lib/symbol_table.h rename to src/util/symbol_table.h diff --git a/lib/timeit.cpp b/src/util/timeit.cpp similarity index 100% rename from lib/timeit.cpp rename to src/util/timeit.cpp diff --git a/lib/timeit.h b/src/util/timeit.h similarity index 100% rename from lib/timeit.h rename to src/util/timeit.h diff --git a/lib/timeout.cpp b/src/util/timeout.cpp similarity index 100% rename from lib/timeout.cpp rename to src/util/timeout.cpp diff --git a/lib/timeout.h b/src/util/timeout.h similarity index 100% rename from lib/timeout.h rename to src/util/timeout.h diff --git a/lib/timer.cpp b/src/util/timer.cpp similarity index 100% rename from lib/timer.cpp rename to src/util/timer.cpp diff --git a/lib/timer.h b/src/util/timer.h similarity index 100% rename from lib/timer.h rename to src/util/timer.h diff --git a/lib/total_order.h b/src/util/total_order.h similarity index 100% rename from lib/total_order.h rename to src/util/total_order.h diff --git a/lib/tptr.h b/src/util/tptr.h similarity index 100% rename from lib/tptr.h rename to src/util/tptr.h diff --git a/lib/trace.cpp b/src/util/trace.cpp similarity index 100% rename from lib/trace.cpp rename to src/util/trace.cpp diff --git a/lib/trace.h b/src/util/trace.h similarity index 100% rename from lib/trace.h rename to src/util/trace.h diff --git a/lib/uint_map.h b/src/util/uint_map.h similarity index 100% rename from lib/uint_map.h rename to src/util/uint_map.h diff --git a/lib/uint_set.h b/src/util/uint_set.h similarity index 100% rename from lib/uint_set.h rename to src/util/uint_set.h diff --git a/lib/util.cpp b/src/util/util.cpp similarity index 100% rename from lib/util.cpp rename to src/util/util.cpp diff --git a/lib/util.h b/src/util/util.h similarity index 100% rename from lib/util.h rename to src/util/util.h diff --git a/lib/vector.h b/src/util/vector.h similarity index 100% rename from lib/vector.h rename to src/util/vector.h diff --git a/lib/version.h b/src/util/version.h similarity index 100% rename from lib/version.h rename to src/util/version.h diff --git a/lib/warning.cpp b/src/util/warning.cpp similarity index 100% rename from lib/warning.cpp rename to src/util/warning.cpp diff --git a/lib/warning.h b/src/util/warning.h similarity index 100% rename from lib/warning.h rename to src/util/warning.h