servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck
authorAlan Jeffrey <ajeffrey@mozilla.com>
Wed, 14 Dec 2016 16:48:42 -0800
changeset 386983 0dfe7146374f72f7f5b5e2c99ff6df6984a81353
parent 386982 7e5c0e38150c47c90e3b3b90fcab0b31a180423f
child 386984 085b6fff20e8f4124b4fdc42cf671db7ec782105
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck <!-- Please describe your changes on the following line: --> This PR removes the `util` crate. * Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std::thread::Builder::spawn`, `std::cmp::min` and `std::cmp::max`. * Moved `opts`, `prefs` and `resource_files` into a new `config` crate. * Moved `remutex` and `geometry` into their own crates. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because they are refactorings <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 4eb653817f87e5fb47de34356f558eb76ecbca9f
servo/Cargo.lock
servo/components/bluetooth/Cargo.toml
servo/components/bluetooth/lib.rs
servo/components/bluetooth_traits/Cargo.toml
servo/components/bluetooth_traits/blocklist.rs
servo/components/bluetooth_traits/lib.rs
servo/components/canvas/Cargo.toml
servo/components/canvas/canvas_paint_thread.rs
servo/components/canvas/lib.rs
servo/components/canvas/webgl_paint_thread.rs
servo/components/compositing/Cargo.toml
servo/components/compositing/compositor.rs
servo/components/compositing/lib.rs
servo/components/compositing/windowing.rs
servo/components/config/Cargo.toml
servo/components/config/basedir.rs
servo/components/config/lib.rs
servo/components/config/opts.rs
servo/components/config/prefs.rs
servo/components/config/resource_files.rs
servo/components/constellation/Cargo.toml
servo/components/constellation/constellation.rs
servo/components/constellation/lib.rs
servo/components/constellation/pipeline.rs
servo/components/constellation/sandboxing.rs
servo/components/debugger/Cargo.toml
servo/components/debugger/lib.rs
servo/components/devtools/Cargo.toml
servo/components/devtools/actors/timeline.rs
servo/components/devtools/lib.rs
servo/components/geometry/Cargo.toml
servo/components/geometry/lib.rs
servo/components/gfx/Cargo.toml
servo/components/gfx/display_list/mod.rs
servo/components/gfx/font_cache_thread.rs
servo/components/gfx/lib.rs
servo/components/layout/Cargo.toml
servo/components/layout/block.rs
servo/components/layout/construct.rs
servo/components/layout/context.rs
servo/components/layout/display_list_builder.rs
servo/components/layout/lib.rs
servo/components/layout/parallel.rs
servo/components/layout/sequential.rs
servo/components/layout/traversal.rs
servo/components/layout_thread/Cargo.toml
servo/components/layout_thread/lib.rs
servo/components/net/Cargo.toml
servo/components/net/chrome_loader.rs
servo/components/net/connector.rs
servo/components/net/content_blocker.rs
servo/components/net/filemanager_thread.rs
servo/components/net/hsts.rs
servo/components/net/http_loader.rs
servo/components/net/image_cache_thread.rs
servo/components/net/lib.rs
servo/components/net/resource_thread.rs
servo/components/net/storage_thread.rs
servo/components/net/websocket_loader.rs
servo/components/net_traits/Cargo.toml
servo/components/net_traits/lib.rs
servo/components/net_traits/pub_domains.rs
servo/components/profile/Cargo.toml
servo/components/profile/heartbeats.rs
servo/components/profile/lib.rs
servo/components/profile/mem.rs
servo/components/profile/time.rs
servo/components/profile_traits/Cargo.toml
servo/components/profile_traits/lib.rs
servo/components/profile_traits/time.rs
servo/components/remutex/Cargo.toml
servo/components/remutex/lib.rs
servo/components/script/Cargo.toml
servo/components/script/dom/bindings/codegen/CodegenRust.py
servo/components/script/dom/bindings/conversions.rs
servo/components/script/dom/bindings/guard.rs
servo/components/script/dom/characterdata.rs
servo/components/script/dom/create.rs
servo/components/script/dom/dedicatedworkerglobalscope.rs
servo/components/script/dom/document.rs
servo/components/script/dom/filereader.rs
servo/components/script/dom/htmlanchorelement.rs
servo/components/script/dom/htmliframeelement.rs
servo/components/script/dom/htmlmetaelement.rs
servo/components/script/dom/mouseevent.rs
servo/components/script/dom/navigatorinfo.rs
servo/components/script/dom/serviceworkerglobalscope.rs
servo/components/script/dom/servoparser/mod.rs
servo/components/script/dom/testbinding.rs
servo/components/script/dom/userscripts.rs
servo/components/script/dom/window.rs
servo/components/script/dom/xmlhttprequest.rs
servo/components/script/lib.rs
servo/components/script/script_runtime.rs
servo/components/script/script_thread.rs
servo/components/script/serviceworker_manager.rs
servo/components/script/timers.rs
servo/components/servo/Cargo.toml
servo/components/servo/lib.rs
servo/components/style/Cargo.toml
servo/components/style/lib.rs
servo/components/style/matching.rs
servo/components/style/parallel.rs
servo/components/style/properties/properties.mako.rs
servo/components/style/stylesheets.rs
servo/components/style/traversal.rs
servo/components/url/Cargo.toml
servo/components/util/Cargo.toml
servo/components/util/basedir.rs
servo/components/util/geometry.rs
servo/components/util/lib.rs
servo/components/util/opts.rs
servo/components/util/prefs.rs
servo/components/util/remutex.rs
servo/components/util/resource_files.rs
servo/components/util/thread.rs
servo/components/webdriver_server/Cargo.toml
servo/components/webdriver_server/lib.rs
servo/ports/cef/Cargo.toml
servo/ports/cef/browser.rs
servo/ports/cef/core.rs
servo/ports/cef/lib.rs
servo/ports/cef/window.rs
servo/ports/glutin/Cargo.toml
servo/ports/glutin/lib.rs
servo/ports/glutin/window.rs
servo/ports/servo/Cargo.toml
servo/ports/servo/main.rs
servo/tests/unit/net/Cargo.toml
servo/tests/unit/net/fetch.rs
servo/tests/unit/net/lib.rs
servo/tests/unit/servo_config/Cargo.toml
servo/tests/unit/servo_config/lib.rs
servo/tests/unit/servo_config/opts.rs
servo/tests/unit/servo_config/prefs.rs
servo/tests/unit/servo_remutex/Cargo.toml
servo/tests/unit/servo_remutex/lib.rs
servo/tests/unit/style/Cargo.toml
servo/tests/unit/style/lib.rs
servo/tests/unit/style/viewport.rs
servo/tests/unit/util/Cargo.toml
servo/tests/unit/util/lib.rs
servo/tests/unit/util/opts.rs
servo/tests/unit/util/prefs.rs
servo/tests/unit/util/remutex.rs
servo/tests/unit/util/thread.rs
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -9,19 +9,19 @@ dependencies = [
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webdriver 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "aho-corasick"
 version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -180,29 +180,28 @@ name = "bluetooth"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bluetooth_traits 0.0.1",
  "device 0.0.1 (git+https://github.com/servo/devices)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
- "util 0.0.1",
  "uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bluetooth_traits"
 version = "0.0.1"
 dependencies = [
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
+ "servo_config 0.0.1",
 ]
 
 [[package]]
 name = "blurdroid"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -260,17 +259,17 @@ dependencies = [
  "canvas_traits 0.0.1",
  "euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "offscreen_gl_context 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
- "util 0.0.1",
+ "servo_config 0.0.1",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "canvas_traits"
 version = "0.0.1"
 dependencies = [
  "azure 0.9.1 (git+https://github.com/servo/rust-azure)",
@@ -393,20 +392,21 @@ dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "script_traits 0.0.1",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "webrender 0.11.0 (git+https://github.com/servo/webrender)",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "constellation"
 version = "0.0.1"
 dependencies = [
@@ -428,19 +428,20 @@ dependencies = [
  "net_traits 0.0.1",
  "offscreen_gl_context 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
+ "servo_remutex 0.0.1",
  "servo_url 0.0.1",
  "style_traits 0.0.1",
- "util 0.0.1",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "content-blocker"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -539,17 +540,16 @@ dependencies = [
  "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "debugger"
 version = "0.0.1"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "ws 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "deque"
 version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -577,17 +577,16 @@ dependencies = [
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "plugins 0.0.1",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
 ]
 
 [[package]]
 name = "devtools_traits"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -652,19 +651,20 @@ dependencies = [
  "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "libservo 0.0.1",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "objc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "script_traits 0.0.1",
+ "servo_config 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "style_traits 0.0.1",
- "util 0.0.1",
  "x11 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "encoding"
 version = "0.2.33"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -936,24 +936,24 @@ dependencies = [
  "ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "range 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_atoms 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "simd 0.1.1 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
  "xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gfx_tests"
 version = "0.0.1"
 dependencies = [
@@ -1021,20 +1021,21 @@ dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "osmesa-src 12.0.1 (git+https://github.com/servo/osmesa-src)",
  "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "style_traits 0.0.1",
  "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "glx"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1317,23 +1318,23 @@ dependencies = [
  "rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_atoms 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "layout_tests"
 version = "0.0.1"
 dependencies = [
  "layout 0.0.1",
@@ -1362,19 +1363,20 @@ dependencies = [
  "profile_traits 0.0.1",
  "rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "script 0.0.1",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "style 0.0.1",
- "util 0.0.1",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "layout_traits"
 version = "0.0.1"
 dependencies = [
  "gfx 0.0.1",
@@ -1484,21 +1486,21 @@ dependencies = [
  "net 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "profile 0.0.1",
  "profile_traits 0.0.1",
  "script 0.0.1",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "webdriver_server 0.0.1",
  "webrender 0.11.0 (git+https://github.com/servo/webrender)",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "libz-sys"
 version = "1.0.6"
@@ -1671,23 +1673,23 @@ dependencies = [
  "net_traits 0.0.1",
  "openssl 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-verify 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "net2"
 version = "0.2.26"
@@ -1711,21 +1713,21 @@ dependencies = [
  "hyper 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper_serde 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
 ]
 
 [[package]]
 name = "net_traits"
 version = "0.0.1"
 dependencies = [
  "bluetooth_traits 0.0.1",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1736,19 +1738,19 @@ dependencies = [
  "image 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "net_traits_tests"
 version = "0.0.1"
@@ -2083,19 +2085,19 @@ dependencies = [
  "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
  "task_info 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
 ]
 
 [[package]]
 name = "profile_tests"
 version = "0.0.1"
 dependencies = [
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "profile 0.0.1",
@@ -2108,19 +2110,19 @@ version = "0.0.1"
 dependencies = [
  "energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "energymon 0.2.0 (git+https://github.com/energymon/energymon-rust.git)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_config 0.0.1",
  "signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
 ]
 
 [[package]]
 name = "quasi"
 version = "0.26.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "syntex_errors 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2287,24 +2289,25 @@ dependencies = [
  "ref_slice 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_atoms 0.0.1",
+ "servo_config 0.0.1",
+ "servo_geometry 0.0.1",
  "servo_url 0.0.1",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.11.0 (git+https://github.com/servo/webrender)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml5ever 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "script_layout_interface"
@@ -2459,19 +2462,20 @@ dependencies = [
  "libservo 0.0.1",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "net_tests 0.0.1",
  "net_traits_tests 0.0.1",
  "phf_macros 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugin_compiletest 0.0.1",
  "profile_tests 0.0.1",
  "script_tests 0.0.1",
+ "servo_config_tests 0.0.1",
+ "servo_remutex_tests 0.0.1",
  "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_tests 0.0.1",
- "util_tests 0.0.1",
 ]
 
 [[package]]
 name = "servo-egl"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2558,16 +2562,68 @@ dependencies = [
 name = "servo_atoms"
 version = "0.0.1"
 dependencies = [
  "string_cache 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache_codegen 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
+name = "servo_config"
+version = "0.0.1"
+dependencies = [
+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "plugins 0.0.1",
+ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo_geometry 0.0.1",
+ "servo_url 0.0.1",
+ "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "servo_config_tests"
+version = "0.0.1"
+dependencies = [
+ "servo_config 0.0.1",
+]
+
+[[package]]
+name = "servo_geometry"
+version = "0.0.1"
+dependencies = [
+ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "servo_remutex"
+version = "0.0.1"
+dependencies = [
+ "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "servo_remutex_tests"
+version = "0.0.1"
+dependencies = [
+ "servo_remutex 0.0.1",
+]
+
+[[package]]
 name = "servo_url"
 version = "0.0.1"
 dependencies = [
  "heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2690,22 +2746,22 @@ dependencies = [
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_atoms 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-segmentation 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "util 0.0.1",
  "walkdir 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_tests"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2713,20 +2769,20 @@ dependencies = [
  "euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever-atoms 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "owning_ref 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_atoms 0.0.1",
+ "servo_config 0.0.1",
  "servo_url 0.0.1",
  "style 0.0.1",
  "style_traits 0.0.1",
- "util 0.0.1",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3014,45 +3070,16 @@ dependencies = [
 ]
 
 [[package]]
 name = "utf8-ranges"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "util"
-version = "0.0.1"
-dependencies = [
- "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "plugins 0.0.1",
- "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo_url 0.0.1",
- "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "util_tests"
-version = "0.0.1"
-dependencies = [
- "util 0.0.1",
-]
-
-[[package]]
 name = "uuid"
 version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.18 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
--- a/servo/components/bluetooth/Cargo.toml
+++ b/servo/components/bluetooth/Cargo.toml
@@ -10,13 +10,12 @@ name = "bluetooth"
 path = "lib.rs"
 
 [dependencies]
 bitflags = "0.7"
 bluetooth_traits = {path = "../bluetooth_traits"}
 device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}
 ipc-channel = "0.5"
 rand = "0.3"
-util = {path = "../util"}
 uuid = {version = "0.3.1", features = ["v4"]}
 
 [target.'cfg(target_os = "linux")'.dependencies]
 tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
--- a/servo/components/bluetooth/lib.rs
+++ b/servo/components/bluetooth/lib.rs
@@ -5,17 +5,16 @@
 #[macro_use]
 extern crate bitflags;
 extern crate bluetooth_traits;
 extern crate device;
 extern crate ipc_channel;
 extern crate rand;
 #[cfg(target_os = "linux")]
 extern crate tinyfiledialogs;
-extern crate util;
 extern crate uuid;
 
 pub mod test;
 
 use bluetooth_traits::{BluetoothCharacteristicMsg, BluetoothDescriptorMsg, BluetoothServiceMsg};
 use bluetooth_traits::{BluetoothDeviceMsg, BluetoothRequest, BluetoothResponse};
 use bluetooth_traits::{BluetoothError, BluetoothResponseResult, BluetoothResult};
 use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
@@ -24,17 +23,16 @@ use device::bluetooth::{BluetoothAdapter
 use device::bluetooth::{BluetoothGATTDescriptor, BluetoothGATTService};
 use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
 use rand::Rng;
 use std::borrow::ToOwned;
 use std::collections::{HashMap, HashSet};
 use std::string::String;
 use std::thread;
 use std::time::Duration;
-use util::thread::spawn_named;
 
 // A transaction not completed within 30 seconds shall time out. Such a transaction shall be considered to have failed.
 // https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=286439 (Vol. 3, page 480)
 const MAXIMUM_TRANSACTION_TIME: u8 = 30;
 const CONNECTION_TIMEOUT_MS: u64 = 1000;
 // The discovery session needs some time to find any nearby devices
 const DISCOVERY_TIMEOUT_MS: u64 = 1500;
 #[cfg(target_os = "linux")]
@@ -83,19 +81,19 @@ macro_rules! get_adapter_or_return_error
 pub trait BluetoothThreadFactory {
     fn new() -> Self;
 }
 
 impl BluetoothThreadFactory for IpcSender<BluetoothRequest> {
     fn new() -> IpcSender<BluetoothRequest> {
         let (sender, receiver) = ipc::channel().unwrap();
         let adapter = BluetoothAdapter::init().ok();
-        spawn_named("BluetoothThread".to_owned(), move || {
+        thread::Builder::new().name("BluetoothThread".to_owned()).spawn(move || {
             BluetoothManager::new(receiver, adapter).start();
-        });
+        }).expect("Thread spawning failed");
         sender
     }
 }
 
 // https://webbluetoothcg.github.io/web-bluetooth/#matches-a-filter
 fn matches_filter(device: &BluetoothDevice, filter: &BluetoothScanfilter) -> bool {
     if filter.is_empty_or_invalid() {
         return false;
--- a/servo/components/bluetooth_traits/Cargo.toml
+++ b/servo/components/bluetooth_traits/Cargo.toml
@@ -9,9 +9,9 @@ publish = false
 name = "bluetooth_traits"
 path = "lib.rs"
 
 [dependencies]
 ipc-channel = "0.5"
 regex = "0.1.43"
 serde = "0.8"
 serde_derive = "0.8"
-util = {path = "../util"}
+servo_config = {path = "../config"}
--- a/servo/components/bluetooth_traits/blocklist.rs
+++ b/servo/components/bluetooth_traits/blocklist.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use regex::Regex;
+use servo_config::resource_files::read_resource_file;
 use std::cell::RefCell;
 use std::collections::HashMap;
 use std::io::BufRead;
 use std::string::String;
-use util::resource_files::read_resource_file;
 
 const BLOCKLIST_FILE: &'static str = "gatt_blocklist.txt";
 const BLOCKLIST_FILE_NOT_FOUND: &'static str = "Could not find gatt_blocklist.txt file";
 const EXCLUDE_READS: &'static str = "exclude-reads";
 const EXCLUDE_WRITES: &'static str = "exclude-writes";
 const VALID_UUID_REGEX: &'static str = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
 
 thread_local!(pub static BLUETOOTH_BLOCKLIST: RefCell<BluetoothBlocklist> =
--- a/servo/components/bluetooth_traits/lib.rs
+++ b/servo/components/bluetooth_traits/lib.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #![feature(proc_macro)]
 
 extern crate ipc_channel;
 extern crate regex;
 #[macro_use]
 extern crate serde_derive;
-extern crate util;
+extern crate servo_config;
 
 pub mod blocklist;
 pub mod scanfilter;
 
 use ipc_channel::ipc::IpcSender;
 use scanfilter::RequestDeviceoptions;
 
 #[derive(Deserialize, Serialize)]
--- a/servo/components/canvas/Cargo.toml
+++ b/servo/components/canvas/Cargo.toml
@@ -14,14 +14,14 @@ azure = {git = "https://github.com/servo
 canvas_traits = {path = "../canvas_traits"}
 euclid = "0.10.1"
 gleam = "0.2.8"
 ipc-channel = "0.5"
 log = "0.3.5"
 num-traits = "0.1.32"
 offscreen_gl_context = "0.5.0"
 plugins = {path = "../plugins"}
-util = {path = "../util"}
+servo_config = {path = "../config"}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive"]
--- a/servo/components/canvas/canvas_paint_thread.rs
+++ b/servo/components/canvas/canvas_paint_thread.rs
@@ -10,17 +10,17 @@ use canvas_traits::*;
 use euclid::matrix2d::Matrix2D;
 use euclid::point::Point2D;
 use euclid::rect::Rect;
 use euclid::size::Size2D;
 use ipc_channel::ipc::{self, IpcSender};
 use num_traits::ToPrimitive;
 use std::borrow::ToOwned;
 use std::mem;
-use util::thread::spawn_named;
+use std::thread;
 use webrender_traits;
 
 impl<'a> CanvasPaintThread<'a> {
     /// It reads image data from the canvas
     /// canvas_size: The size of the canvas we're reading from
     /// read_rect: The area of the canvas we want to read from
     fn read_pixels(&self, read_rect: Rect<i32>, canvas_size: Size2D<f64>) -> Vec<u8>{
         let canvas_size = canvas_size.to_i32();
@@ -116,17 +116,17 @@ impl<'a> CanvasPaintThread<'a> {
 
     /// Creates a new `CanvasPaintThread` and returns an `IpcSender` to
     /// communicate with it.
     pub fn start(size: Size2D<i32>,
                  webrender_api_sender: webrender_traits::RenderApiSender,
                  antialias: bool)
                  -> IpcSender<CanvasMsg> {
         let (sender, receiver) = ipc::channel::<CanvasMsg>().unwrap();
-        spawn_named("CanvasThread".to_owned(), move || {
+        thread::Builder::new().name("CanvasThread".to_owned()).spawn(move || {
             let mut painter = CanvasPaintThread::new(size, webrender_api_sender, antialias);
             loop {
                 let msg = receiver.recv();
                 match msg.unwrap() {
                     CanvasMsg::Canvas2d(message) => {
                         match message {
                             Canvas2dMsg::FillRect(ref rect) => painter.fill_rect(rect),
                             Canvas2dMsg::StrokeRect(ref rect) => painter.stroke_rect(rect),
@@ -206,17 +206,17 @@ impl<'a> CanvasPaintThread<'a> {
                             FromLayoutMsg::SendData(chan) => {
                                 painter.send_data(chan)
                             }
                         }
                     }
                     CanvasMsg::WebGL(_) => panic!("Wrong message sent to Canvas2D thread"),
                 }
             }
-        });
+        }).expect("Thread spawning failed");
 
         sender
     }
 
     fn save_context_state(&mut self) {
         self.saved_states.push(self.state.clone());
     }
 
--- a/servo/components/canvas/lib.rs
+++ b/servo/components/canvas/lib.rs
@@ -12,13 +12,13 @@ extern crate canvas_traits;
 extern crate core;
 extern crate euclid;
 extern crate gleam;
 extern crate ipc_channel;
 #[macro_use]
 extern crate log;
 extern crate num_traits;
 extern crate offscreen_gl_context;
-extern crate util;
+extern crate servo_config;
 extern crate webrender_traits;
 
 pub mod canvas_paint_thread;
 pub mod webgl_paint_thread;
--- a/servo/components/canvas/webgl_paint_thread.rs
+++ b/servo/components/canvas/webgl_paint_thread.rs
@@ -4,20 +4,20 @@
 
 use canvas_traits::{CanvasCommonMsg, CanvasData, CanvasMsg, CanvasImageData};
 use canvas_traits::{FromLayoutMsg, FromScriptMsg, byte_swap};
 use euclid::size::Size2D;
 use gleam::gl;
 use ipc_channel::ipc::{self, IpcSender};
 use offscreen_gl_context::{ColorAttachmentType, GLContext, GLLimits};
 use offscreen_gl_context::{GLContextAttributes, NativeGLContext, OSMesaContext};
+use servo_config::opts;
 use std::borrow::ToOwned;
 use std::sync::mpsc::channel;
-use util::opts;
-use util::thread::spawn_named;
+use std::thread;
 use webrender_traits;
 
 enum GLContextWrapper {
     Native(GLContext<NativeGLContext>),
     OSMesa(GLContext<OSMesaContext>),
 }
 
 impl GLContextWrapper {
@@ -146,17 +146,17 @@ impl WebGLPaintThread {
     /// Creates a new `WebGLPaintThread` and returns an `IpcSender` to
     /// communicate with it.
     pub fn start(size: Size2D<i32>,
                  attrs: GLContextAttributes,
                  webrender_api_sender: webrender_traits::RenderApiSender)
                  -> Result<(IpcSender<CanvasMsg>, GLLimits), String> {
         let (sender, receiver) = ipc::channel::<CanvasMsg>().unwrap();
         let (result_chan, result_port) = channel();
-        spawn_named("WebGLThread".to_owned(), move || {
+        thread::Builder::new().name("WebGLThread".to_owned()).spawn(move || {
             let mut painter = match WebGLPaintThread::new(size, attrs, webrender_api_sender) {
                 Ok((thread, limits)) => {
                     result_chan.send(Ok(limits)).unwrap();
                     thread
                 },
                 Err(e) => {
                     result_chan.send(Err(e)).unwrap();
                     return
@@ -186,17 +186,17 @@ impl WebGLPaintThread {
                         match message {
                             FromLayoutMsg::SendData(chan) =>
                                 painter.send_data(chan),
                         }
                     }
                     CanvasMsg::Canvas2d(_) => panic!("Wrong message sent to WebGLThread"),
                 }
             }
-        });
+        }).expect("Thread spawning failed");
 
         result_port.recv().unwrap().map(|limits| (sender, limits))
     }
 
     fn send_data(&mut self, chan: IpcSender<CanvasData>) {
         match self.data {
             WebGLPaintTaskData::Readback(_, ref webrender_api, image_key) => {
                 let width = self.size.width as usize;
--- a/servo/components/compositing/Cargo.toml
+++ b/servo/components/compositing/Cargo.toml
@@ -18,20 +18,21 @@ ipc-channel = "0.5"
 log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 script_traits = {path = "../script_traits"}
 serde = "0.8"
 serde_derive = "0.8"
+servo_config = {path = "../config", features = ["servo"]}
+servo_geometry = {path = "../geometry", features = ["servo"]}
 servo_url = {path = "../url", features = ["servo"]}
 style_traits = {path = "../style_traits"}
 time = "0.1.17"
-util = {path = "../util"}
 
 [dependencies.webrender]
 git = "https://github.com/servo/webrender"
 default-features = false
 features = ["serde_derive"]
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -21,29 +21,29 @@ use msg::constellation_msg::{Key, KeyMod
 use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId, TraversalDirection};
 use net_traits::image::base::{Image, PixelFormat};
 use profile_traits::time::{self, ProfilerCategory, profile};
 use script_traits::{AnimationState, AnimationTickType, ConstellationControlMsg};
 use script_traits::{ConstellationMsg, LayoutControlMsg, LoadData, MouseButton};
 use script_traits::{MouseEventType, StackingContextScrollState};
 use script_traits::{TouchpadPressurePhase, TouchEventType, TouchId, WindowSizeData, WindowSizeType};
 use script_traits::CompositorEvent::{self, MouseMoveEvent, MouseButtonEvent, TouchEvent, TouchpadPressureEvent};
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_geometry::ScreenPx;
 use servo_url::ServoUrl;
 use std::collections::HashMap;
 use std::fs::File;
 use std::rc::Rc;
 use std::sync::mpsc::Sender;
 use std::time::{Duration, Instant};
 use style_traits::{PagePx, ViewportPx};
 use style_traits::viewport::ViewportConstraints;
 use time::{precise_time_ns, precise_time_s};
 use touch::{TouchHandler, TouchAction};
-use util::geometry::ScreenPx;
-use util::opts;
-use util::prefs::PREFS;
 use webrender;
 use webrender_traits::{self, ScrollEventPhase, ServoScrollRootId};
 use windowing::{self, MouseWindowEvent, WindowEvent, WindowMethods, WindowNavigateMsg};
 
 #[derive(Debug, PartialEq)]
 enum UnableToComposite {
     WindowUnprepared,
     NotReadyToPaintImage(NotReadyToPaint),
--- a/servo/components/compositing/lib.rs
+++ b/servo/components/compositing/lib.rs
@@ -18,21 +18,21 @@ extern crate ipc_channel;
 extern crate log;
 extern crate msg;
 extern crate net_traits;
 #[macro_use]
 extern crate profile_traits;
 extern crate script_traits;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_config;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate style_traits;
 extern crate time;
-#[macro_use]
-extern crate util;
 extern crate webrender;
 extern crate webrender_traits;
 
 pub use compositor_thread::CompositorProxy;
 pub use compositor::IOCompositor;
 use euclid::size::TypedSize2D;
 use ipc_channel::ipc::IpcSender;
 use msg::constellation_msg::PipelineId;
--- a/servo/components/compositing/windowing.rs
+++ b/servo/components/compositing/windowing.rs
@@ -8,20 +8,20 @@ use compositor_thread::{CompositorProxy,
 use euclid::{Point2D, Size2D};
 use euclid::point::TypedPoint2D;
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::TypedSize2D;
 use gfx_traits::DevicePixel;
 use msg::constellation_msg::{Key, KeyModifiers, KeyState};
 use net_traits::net_error_list::NetError;
 use script_traits::{MouseButton, TouchEventType, TouchId, TouchpadPressurePhase};
+use servo_geometry::ScreenPx;
 use servo_url::ServoUrl;
 use std::fmt::{Debug, Error, Formatter};
 use style_traits::cursor::Cursor;
-use util::geometry::ScreenPx;
 
 #[derive(Clone)]
 pub enum MouseWindowEvent {
     Click(MouseButton, TypedPoint2D<f32, DevicePixel>),
     MouseDown(MouseButton, TypedPoint2D<f32, DevicePixel>),
     MouseUp(MouseButton, TypedPoint2D<f32, DevicePixel>),
 }
 
rename from servo/components/util/Cargo.toml
rename to servo/components/config/Cargo.toml
--- a/servo/components/util/Cargo.toml
+++ b/servo/components/config/Cargo.toml
@@ -1,36 +1,34 @@
 [package]
-name = "util"
+name = "servo_config"
 version = "0.0.1"
 authors = ["The Servo Project Developers"]
 license = "MPL-2.0"
 publish = false
 
 [lib]
-name = "util"
+name = "servo_config"
 path = "lib.rs"
 
 [features]
 # servo as opposed to geckolib
-servo = ["serde", "serde_derive", "app_units/plugins",
-         "euclid/unstable", "url/heap_size", "url/serde", "plugins"]
+servo = ["serde", "serde_derive", "url/heap_size", "url/serde", "plugins"]
 
 [dependencies]
-app_units = "0.3"
 bitflags = "0.7"
 euclid = "0.10.1"
 getopts = "0.2.11"
-heapsize = "0.3.0"
 lazy_static = "0.2"
 log = "0.3.5"
 num_cpus = "1.1.0"
 rustc-serialize = "0.3"
 serde = {version = "0.8", optional = true}
 serde_derive = {version = "0.8", optional = true}
+servo_geometry = {path = "../geometry"}
 servo_url = {path = "../url"}
 plugins = {path = "../plugins", optional = true}
 url = "1.2"
 
 [dev-dependencies]
 env_logger = "0.3"
 
 [target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))'.dependencies]
rename from servo/components/util/basedir.rs
rename to servo/components/config/basedir.rs
rename from servo/components/util/lib.rs
rename to servo/components/config/lib.rs
--- a/servo/components/util/lib.rs
+++ b/servo/components/config/lib.rs
@@ -1,54 +1,39 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#![cfg_attr(feature = "servo", feature(nonzero))]
 #![cfg_attr(feature = "servo", feature(plugin))]
 #![cfg_attr(feature = "servo", feature(proc_macro))]
 #![cfg_attr(feature = "servo", plugin(plugins))]
 
 #![deny(unsafe_code)]
 
-extern crate app_units;
 #[allow(unused_extern_crates)] #[macro_use] extern crate bitflags;
 extern crate core;
-#[macro_use] extern crate euclid;
+extern crate euclid;
 extern crate getopts;
-#[macro_use] extern crate heapsize;
 #[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static;
 #[macro_use] extern crate log;
 extern crate num_cpus;
 extern crate rustc_serialize;
 #[cfg(feature = "servo")] extern crate serde;
 #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate url;
 #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
 extern crate xdg;
 
 pub mod basedir;
-pub mod geometry;
 #[allow(unsafe_code)] pub mod opts;
 pub mod prefs;
-#[cfg(feature = "servo")] pub mod remutex;
 pub mod resource_files;
-pub mod thread;
 
 pub fn servo_version() -> String {
     let cargo_version = env!("CARGO_PKG_VERSION");
     let git_info = option_env!("GIT_INFO");
     match git_info {
         Some(info) => format!("Servo {}{}", cargo_version, info),
         None => format!("Servo {}", cargo_version),
     }
 }
-
-pub fn clamp<T: Ord>(lo: T, mid: T, hi: T) -> T {
-    if mid < lo {
-        lo
-    } else if mid > hi {
-        hi
-    } else {
-        mid
-    }
-}
rename from servo/components/util/opts.rs
rename to servo/components/config/opts.rs
--- a/servo/components/util/opts.rs
+++ b/servo/components/config/opts.rs
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Configuration options for a single run of the servo application. Created
 //! from command line arguments.
 
 use euclid::size::TypedSize2D;
-use geometry::ScreenPx;
 use getopts::Options;
 use num_cpus;
 use prefs::{self, PrefValue, PREFS};
 use resource_files::set_resources_path;
+use servo_geometry::ScreenPx;
 use servo_url::ServoUrl;
 use std::borrow::Cow;
 use std::cmp;
 use std::default::Default;
 use std::env;
 use std::fs::{self, File};
 use std::io::{self, Read, Write};
 use std::path::{Path, PathBuf};
rename from servo/components/util/prefs.rs
rename to servo/components/config/prefs.rs
rename from servo/components/util/resource_files.rs
rename to servo/components/config/resource_files.rs
--- a/servo/components/constellation/Cargo.toml
+++ b/servo/components/constellation/Cargo.toml
@@ -28,18 +28,19 @@ net_traits = {path = "../net_traits"}
 offscreen_gl_context = "0.5.0"
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rand = "0.3"
 script_traits = {path = "../script_traits"}
 serde = "0.8"
 serde_derive = "0.8"
 style_traits = {path = "../style_traits"}
+servo_config = {path = "../config", features = ["servo"]}
+servo_remutex = {path = "../remutex"}
 servo_url = {path = "../url", features = ["servo"]}
-util = {path = "../util"}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive", "ipc"]
 
 [target.'cfg(not(target_os = "windows"))'.dependencies]
 gaol = {git = "https://github.com/servo/gaol"}
--- a/servo/components/constellation/constellation.rs
+++ b/servo/components/constellation/constellation.rs
@@ -42,16 +42,19 @@ use rand::{Rng, SeedableRng, StdRng, ran
 use script_traits::{AnimationState, AnimationTickType, CompositorEvent};
 use script_traits::{ConstellationControlMsg, ConstellationMsg as FromCompositorMsg};
 use script_traits::{DocumentState, LayoutControlMsg, LoadData};
 use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerEventRequest};
 use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory};
 use script_traits::{LogEntry, ServiceWorkerMsg, webdriver_msg};
 use script_traits::{MozBrowserErrorType, MozBrowserEvent, WebDriverCommandMsg, WindowSizeData};
 use script_traits::{SWManagerMsg, ScopeThings, WindowSizeType};
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_remutex::ReentrantMutex;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::{HashMap, VecDeque};
 use std::io::Error as IOError;
 use std::iter::once;
 use std::marker::PhantomData;
 use std::mem::replace;
 use std::process;
@@ -59,20 +62,16 @@ use std::rc::{Rc, Weak};
 use std::sync::Arc;
 use std::sync::mpsc::{Receiver, Sender, channel};
 use std::thread;
 use std::time::Instant;
 use style_traits::PagePx;
 use style_traits::cursor::Cursor;
 use style_traits::viewport::ViewportConstraints;
 use timer_scheduler::TimerScheduler;
-use util::opts;
-use util::prefs::PREFS;
-use util::remutex::ReentrantMutex;
-use util::thread::spawn_named;
 use webrender_traits;
 
 #[derive(Debug, PartialEq)]
 enum ReadyToSave {
     NoRootFrame,
     PendingFrames,
     WebFontNotLoaded,
     DocumentLoading,
@@ -500,17 +499,17 @@ impl<Message, LTF, STF> Constellation<Me
 {
     pub fn start(state: InitialConstellationState) -> (Sender<FromCompositorMsg>, IpcSender<SWManagerMsg>) {
         let (compositor_sender, compositor_receiver) = channel();
 
         // service worker manager to communicate with constellation
         let (swmanager_sender, swmanager_receiver) = ipc::channel().expect("ipc channel failure");
         let sw_mgr_clone = swmanager_sender.clone();
 
-        spawn_named("Constellation".to_owned(), move || {
+        thread::Builder::new().name("Constellation".to_owned()).spawn(move || {
             let (ipc_script_sender, ipc_script_receiver) = ipc::channel().expect("ipc channel failure");
             let script_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_script_receiver);
 
             let (ipc_layout_sender, ipc_layout_receiver) = ipc::channel().expect("ipc channel failure");
             let layout_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_layout_receiver);
 
             let swmanager_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(swmanager_receiver);
 
@@ -563,17 +562,18 @@ impl<Message, LTF, STF> Constellation<Me
                     let rng = StdRng::from_seed(&[seed]);
                     warn!("Randomly closing pipelines.");
                     info!("Using seed {} for random pipeline closure.", seed);
                     (rng, prob)
                 }),
             };
 
             constellation.run();
-        });
+        }).expect("Thread spawning failed");
+
         (compositor_sender, swmanager_sender)
     }
 
     fn run(&mut self) {
         while !self.shutting_down || !self.pipelines.is_empty() {
             // Randomly close a pipeline if --random-pipeline-closure-probability is set
             // This is for testing the hardening of the constellation.
             self.maybe_close_random_pipeline();
--- a/servo/components/constellation/lib.rs
+++ b/servo/components/constellation/lib.rs
@@ -31,20 +31,20 @@ extern crate net_traits;
 extern crate offscreen_gl_context;
 #[macro_use]
 extern crate profile_traits;
 extern crate rand;
 extern crate script_traits;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_config;
+extern crate servo_remutex;
 extern crate servo_url;
 extern crate style_traits;
-#[macro_use]
-extern crate util;
 extern crate webrender_traits;
 
 mod constellation;
 mod pipeline;
 #[cfg(not(target_os = "windows"))]
 mod sandboxing;
 mod timer_scheduler;
 
--- a/servo/components/constellation/pipeline.rs
+++ b/servo/components/constellation/pipeline.rs
@@ -19,27 +19,27 @@ use msg::constellation_msg::{FrameId, Fr
 use net_traits::{IpcSend, ResourceThreads};
 use net_traits::image_cache_thread::ImageCacheThread;
 use profile_traits::mem as profile_mem;
 use profile_traits::time;
 use script_traits::{ConstellationControlMsg, InitialScriptState};
 use script_traits::{LayoutControlMsg, LayoutMsg, LoadData, MozBrowserEvent};
 use script_traits::{NewLayoutInfo, SWManagerMsg, SWManagerSenders, ScriptMsg};
 use script_traits::{ScriptThreadFactory, TimerEventRequest, WindowSizeData};
+use servo_config::opts::{self, Opts};
+use servo_config::prefs::{PREFS, Pref};
 use servo_url::ServoUrl;
 use std::collections::HashMap;
 use std::env;
 use std::ffi::OsStr;
 use std::io::Error as IOError;
 use std::process;
 use std::rc::Rc;
 use std::sync::mpsc::Sender;
 use style_traits::{PagePx, ViewportPx};
-use util::opts::{self, Opts};
-use util::prefs::{PREFS, Pref};
 use webrender_traits;
 
 /// A uniquely-identifiable pipeline of script thread, layout thread, and paint thread.
 pub struct Pipeline {
     pub id: PipelineId,
     /// The ID of the frame that contains this Pipeline.
     pub frame_id: FrameId,
     pub parent_info: Option<(PipelineId, FrameType)>,
--- a/servo/components/constellation/sandboxing.rs
+++ b/servo/components/constellation/sandboxing.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use gaol::profile::{Operation, PathPattern, Profile};
+use servo_config::resource_files;
 use std::path::PathBuf;
-use util::resource_files;
 
 /// Our content process sandbox profile on Mac. As restrictive as possible.
 #[cfg(target_os = "macos")]
 pub fn content_process_sandbox_profile() -> Profile {
     use gaol::platform;
     Profile::new(vec![
         Operation::FileReadAll(PathPattern::Literal(PathBuf::from("/dev/urandom"))),
         Operation::FileReadAll(PathPattern::Subpath(resource_files::resources_dir_path()
--- a/servo/components/debugger/Cargo.toml
+++ b/servo/components/debugger/Cargo.toml
@@ -7,12 +7,11 @@ publish = false
 
 [lib]
 name = "debugger"
 path = "lib.rs"
 crate_type = ["rlib"]
 
 [dependencies]
 log = "0.3.5"
-util = {path = "../util"}
 
 [target.'cfg(not(target_os = "android"))'.dependencies]
 ws = "0.5.3"
--- a/servo/components/debugger/lib.rs
+++ b/servo/components/debugger/lib.rs
@@ -1,21 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #[macro_use]
 extern crate log;
-extern crate util;
 #[cfg(not(target_os = "android"))]
 extern crate ws;
 
 use std::sync::mpsc;
 use std::sync::mpsc::channel;
-use util::thread::spawn_named;
+use std::thread;
 #[cfg(not(target_os = "android"))]
 use ws::{Builder, CloseCode, Handler, Handshake};
 
 enum Message {
     ShutdownServer,
 }
 
 pub struct Sender(mpsc::Sender<Message>);
@@ -40,33 +39,33 @@ impl Handler for Connection {
         self.sender.send(message)
     }
 }
 
 #[cfg(not(target_os = "android"))]
 pub fn start_server(port: u16) -> Sender {
     debug!("Starting server.");
     let (sender, receiver) = channel();
-    spawn_named("debugger".to_owned(), move || {
+    thread::Builder::new().name("debugger".to_owned()).spawn(move || {
         let socket = Builder::new().build(|sender: ws::Sender| {
             Connection { sender: sender }
         }).unwrap();
         let sender = socket.broadcaster();
-        spawn_named("debugger-websocket".to_owned(), move || {
+        thread::Builder::new().name("debugger-websocket".to_owned()).spawn(move || {
             socket.listen(("127.0.0.1", port)).unwrap();
-        });
+        }).expect("Thread spawning failed");
         while let Ok(message) = receiver.recv() {
             match message {
                 Message::ShutdownServer => {
                     break;
                 }
             }
         }
         sender.shutdown().unwrap();
-    });
+    }).expect("Thread spawning failed");
     Sender(sender)
 }
 
 #[cfg(target_os = "android")]
 pub fn start_server(_: u16) -> Sender {
     panic!("Debugger is not supported on Android");
 }
 
--- a/servo/components/devtools/Cargo.toml
+++ b/servo/components/devtools/Cargo.toml
@@ -17,9 +17,8 @@ hyper_serde = "0.1.4"
 ipc-channel = "0.5"
 log = "0.3.5"
 msg = {path = "../msg"}
 plugins = {path = "../plugins"}
 serde = "0.8"
 serde_json = "0.8"
 serde_derive = "0.8"
 time = "0.1"
-util = {path = "../util"}
--- a/servo/components/devtools/actors/timeline.rs
+++ b/servo/components/devtools/actors/timeline.rs
@@ -14,17 +14,16 @@ use protocol::JsonPacketStream;
 use serde::{Serialize, Serializer};
 use serde_json::Value;
 use std::cell::RefCell;
 use std::collections::BTreeMap;
 use std::net::TcpStream;
 use std::sync::{Arc, Mutex};
 use std::thread;
 use std::time::Duration;
-use util::thread::spawn_named;
 
 pub struct TimelineActor {
     name: String,
     script_sender: IpcSender<DevtoolScriptControlMsg>,
     marker_types: Vec<TimelineMarkerType>,
     pipeline: PipelineId,
     is_recording: Arc<Mutex<bool>>,
     stream: RefCell<Option<TcpStream>>,
@@ -145,31 +144,31 @@ impl TimelineActor {
 
     fn pull_timeline_data(&self, receiver: IpcReceiver<Option<TimelineMarker>>, mut emitter: Emitter) {
         let is_recording = self.is_recording.clone();
 
         if !*is_recording.lock().unwrap() {
             return;
         }
 
-        spawn_named("PullTimelineMarkers".to_owned(), move || {
+        thread::Builder::new().name("PullTimelineMarkers".to_owned()).spawn(move || {
             loop {
                 if !*is_recording.lock().unwrap() {
                     break;
                 }
 
                 let mut markers = vec![];
                 while let Ok(Some(marker)) = receiver.try_recv() {
                     markers.push(emitter.marker(marker));
                 }
                 emitter.send(markers);
 
                 thread::sleep(Duration::from_millis(DEFAULT_TIMELINE_DATA_PULL_TIMEOUT));
             }
-        });
+        }).expect("Thread spawning failed");
     }
 }
 
 impl Actor for TimelineActor {
     fn name(&self) -> String {
         self.name.clone()
     }
 
--- a/servo/components/devtools/lib.rs
+++ b/servo/components/devtools/lib.rs
@@ -25,17 +25,16 @@ extern crate ipc_channel;
 #[macro_use]
 extern crate log;
 extern crate msg;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
 extern crate serde_json;
 extern crate time;
-extern crate util;
 
 use actor::{Actor, ActorRegistry};
 use actors::console::ConsoleActor;
 use actors::framerate::FramerateActor;
 use actors::inspector::InspectorActor;
 use actors::network_event::{EventActor, NetworkEventActor, ResponseStartMsg};
 use actors::performance::PerformanceActor;
 use actors::profiler::ProfilerActor;
@@ -52,18 +51,18 @@ use msg::constellation_msg::PipelineId;
 use protocol::JsonPacketStream;
 use std::borrow::ToOwned;
 use std::cell::RefCell;
 use std::collections::HashMap;
 use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::net::{Shutdown, TcpListener, TcpStream};
 use std::sync::{Arc, Mutex};
 use std::sync::mpsc::{Receiver, Sender, channel};
+use std::thread;
 use time::precise_time_ns;
-use util::thread::spawn_named;
 
 mod actor;
 /// Corresponds to http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/
 mod actors {
     pub mod console;
     pub mod framerate;
     pub mod inspector;
     pub mod memory;
@@ -132,19 +131,19 @@ struct ResponseStartUpdateMsg {
     response: ResponseStartMsg,
 }
 
 /// Spin up a devtools server that listens for connections on the specified port.
 pub fn start_server(port: u16) -> Sender<DevtoolsControlMsg> {
     let (sender, receiver) = channel();
     {
         let sender = sender.clone();
-        spawn_named("Devtools".to_owned(), move || {
+        thread::Builder::new().name("Devtools".to_owned()).spawn(move || {
             run_server(sender, receiver, port)
-        });
+        }).expect("Thread spawning failed");
     }
     sender
 }
 
 fn run_server(sender: Sender<DevtoolsControlMsg>,
               receiver: Receiver<DevtoolsControlMsg>,
               port: u16) {
     let listener = TcpListener::bind(&("127.0.0.1", port)).unwrap();
@@ -480,33 +479,33 @@ fn run_server(sender: Sender<DevtoolsCon
                 entry.insert(actor_name.clone());
                 actors.register(box actor);
                 actor_name
             }
         }
     }
 
     let sender_clone = sender.clone();
-    spawn_named("DevtoolsClientAcceptor".to_owned(), move || {
+    thread::Builder::new().name("DevtoolsClientAcceptor".to_owned()).spawn(move || {
         // accept connections and process them, spawning a new thread for each one
         for stream in listener.incoming() {
             // connection succeeded
             sender_clone.send(DevtoolsControlMsg::FromChrome(
                     ChromeToDevtoolsControlMsg::AddClient(stream.unwrap()))).unwrap();
         }
-    });
+    }).expect("Thread spawning failed");
 
     while let Ok(msg) = receiver.recv() {
         match msg {
             DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::AddClient(stream)) => {
                 let actors = actors.clone();
                 accepted_connections.push(stream.try_clone().unwrap());
-                spawn_named("DevtoolsClientHandler".to_owned(), move || {
+                thread::Builder::new().name("DevtoolsClientHandler".to_owned()).spawn(move || {
                     handle_client(actors, stream.try_clone().unwrap())
-                })
+                }).expect("Thread spawning failed");
             }
             DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::FramerateTick(
                         actor_name, tick)) =>
                 handle_framerate_tick(actors.clone(), actor_name, tick),
             DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::NewGlobal(
                         ids, script_sender, pageinfo)) =>
                 handle_new_global(actors.clone(), ids, script_sender, &mut actor_pipelines,
                                   &mut actor_workers, pageinfo),
new file mode 100644
--- /dev/null
+++ b/servo/components/geometry/Cargo.toml
@@ -0,0 +1,19 @@
+[package]
+name = "servo_geometry"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+publish = false
+
+[lib]
+name = "servo_geometry"
+path = "lib.rs"
+
+[features]
+# servo as opposed to geckolib
+servo = ["app_units/plugins", "euclid/unstable"]
+
+[dependencies]
+app_units = "0.3"
+euclid = "0.10.1"
+heapsize = "0.3.0"
rename from servo/components/util/geometry.rs
rename to servo/components/geometry/lib.rs
--- a/servo/components/util/geometry.rs
+++ b/servo/components/geometry/lib.rs
@@ -1,12 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+extern crate app_units;
+#[macro_use] extern crate euclid;
+#[macro_use] extern crate heapsize;
+
 use app_units::{Au, MAX_AU};
 use euclid::point::Point2D;
 use euclid::rect::Rect;
 use euclid::size::Size2D;
 use std::i32;
 
 // Units for use with euclid::length and euclid::scale_factor.
 
--- a/servo/components/gfx/Cargo.toml
+++ b/servo/components/gfx/Cargo.toml
@@ -27,24 +27,24 @@ log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
 ordered-float = "0.2.2"
 plugins = {path = "../plugins"}
 range = {path = "../range"}
 rustc-serialize = "0.3"
 serde = "0.8"
 servo_atoms = {path = "../atoms"}
+servo_geometry = {path = "../geometry"}
 servo_url = {path = "../url"}
 serde_derive = "0.8"
 smallvec = "0.1"
 style = {path = "../style"}
 style_traits = {path = "../style_traits"}
 time = "0.1.12"
 unicode-script = {version = "0.1", features = ["harfbuzz"]}
-util = {path = "../util"}
 xi-unicode = "0.0.1"
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive", "ipc"]
 
 [target.'cfg(target_os = "macos")'.dependencies]
--- a/servo/components/gfx/display_list/mod.rs
+++ b/servo/components/gfx/display_list/mod.rs
@@ -20,25 +20,25 @@ use euclid::num::{One, Zero};
 use euclid::rect::TypedRect;
 use euclid::side_offsets::SideOffsets2D;
 use gfx_traits::{ScrollPolicy, ScrollRootId, StackingContextId};
 use gfx_traits::print_tree::PrintTree;
 use ipc_channel::ipc::IpcSharedMemory;
 use msg::constellation_msg::PipelineId;
 use net_traits::image::base::{Image, PixelFormat};
 use range::Range;
+use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, max_rect};
 use std::cmp::{self, Ordering};
 use std::collections::HashMap;
 use std::fmt;
 use std::sync::Arc;
 use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
 use style_traits::cursor::Cursor;
 use text::TextRun;
 use text::glyph::ByteIndex;
-use util::geometry::{self, max_rect};
 use webrender_traits::{self, ColorF, GradientStop, WebGLContextId};
 
 pub use style::dom::OpaqueNode;
 
 /// The factor that we multiply the blur radius by in order to inflate the boundaries of display
 /// items that involve a blur. This ensures that the display item boundaries include all the ink.
 pub static BLUR_INFLATION_FACTOR: i32 = 3;
 
@@ -392,19 +392,19 @@ impl StackingContext {
         // uncommon case.
         let origin_x = self.bounds.origin.x.to_f32_px();
         let origin_y = self.bounds.origin.y.to_f32_px();
 
         let transform = Matrix4D::identity().pre_translated(origin_x, origin_y, 0.0)
                                             .pre_mul(&self.transform);
         let transform_2d = transform.to_2d();
 
-        let overflow = geometry::au_rect_to_f32_rect(self.overflow);
+        let overflow = au_rect_to_f32_rect(self.overflow);
         let overflow = transform_2d.transform_rect(&overflow);
-        geometry::f32_rect_to_au_rect(overflow)
+        f32_rect_to_au_rect(overflow)
     }
 
     pub fn print_with_tree(&self, print_tree: &mut PrintTree) {
         print_tree.new_level(format!("{:?}", self));
         for kid in self.children() {
             kid.print_with_tree(print_tree);
         }
         print_tree.end_level();
--- a/servo/components/gfx/font_cache_thread.rs
+++ b/servo/components/gfx/font_cache_thread.rs
@@ -16,20 +16,20 @@ use platform::font_list::system_default_
 use platform::font_template::FontTemplateData;
 use servo_atoms::Atom;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::HashMap;
 use std::mem;
 use std::ops::Deref;
 use std::sync::{Arc, Mutex};
+use std::thread;
 use std::u32;
 use style::font_face::{EffectiveSources, Source};
 use style::properties::longhands::font_family::computed_value::FontFamily;
-use util::thread::spawn_named;
 use webrender_traits;
 
 /// A list of font templates that make up a given font family.
 struct FontTemplates {
     templates: Vec<FontTemplate>,
 }
 
 #[derive(Serialize, Deserialize, Debug)]
@@ -391,17 +391,17 @@ pub struct FontCacheThread {
 }
 
 impl FontCacheThread {
     pub fn new(core_resource_thread: CoreResourceThread,
                webrender_api: Option<webrender_traits::RenderApi>) -> FontCacheThread {
         let (chan, port) = ipc::channel().unwrap();
 
         let channel_to_self = chan.clone();
-        spawn_named("FontCacheThread".to_owned(), move || {
+        thread::Builder::new().name("FontCacheThread".to_owned()).spawn(move || {
             // TODO: Allow users to specify these.
             let generic_fonts = populate_generic_fonts();
 
             let mut cache = FontCache {
                 port: port,
                 channel_to_self: channel_to_self,
                 generic_fonts: generic_fonts,
                 local_families: HashMap::new(),
@@ -409,17 +409,17 @@ impl FontCacheThread {
                 font_context: FontContextHandle::new(),
                 core_resource_thread: core_resource_thread,
                 webrender_api: webrender_api,
                 webrender_fonts: HashMap::new(),
             };
 
             cache.refresh_local_families();
             cache.run();
-        });
+        }).expect("Thread spawning failed");
 
         FontCacheThread {
             chan: chan,
         }
     }
 
     pub fn find_font_template(&self, family: FontFamily, desc: FontTemplateDescriptor)
                                                 -> Option<FontTemplateInfo> {
--- a/servo/components/gfx/lib.rs
+++ b/servo/components/gfx/lib.rs
@@ -58,26 +58,26 @@ extern crate msg;
 extern crate net_traits;
 extern crate ordered_float;
 #[macro_use]
 extern crate range;
 extern crate rustc_serialize;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_geometry;
 extern crate servo_url;
 #[macro_use] extern crate servo_atoms;
 #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
 extern crate simd;
 extern crate smallvec;
 extern crate style;
 extern crate style_traits;
 extern crate time;
 extern crate unicode_script;
-extern crate util;
 extern crate webrender_traits;
 extern crate xi_unicode;
 
 #[deny(unsafe_code)]
 pub mod display_list;
 
 // Fonts
 #[macro_use] pub mod font;
--- a/servo/components/layout/Cargo.toml
+++ b/servo/components/layout/Cargo.toml
@@ -34,20 +34,20 @@ range = {path = "../range"}
 rayon = "0.5"
 script_layout_interface = {path = "../script_layout_interface"}
 script_traits = {path = "../script_traits"}
 selectors = "0.15"
 serde = "0.8"
 serde_derive = "0.8"
 serde_json = "0.8"
 servo_atoms = {path = "../atoms"}
+servo_config = {path = "../config"}
 servo_url = {path = "../url"}
 smallvec = "0.1"
 style = {path = "../style"}
 style_traits = {path = "../style_traits"}
 unicode-bidi = "0.2"
 unicode-script = {version = "0.1", features = ["harfbuzz"]}
-util = {path = "../util"}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive", "ipc"]
--- a/servo/components/layout/block.rs
+++ b/servo/components/layout/block.rs
@@ -56,17 +56,16 @@ use std::sync::Arc;
 use style::computed_values::{border_collapse, box_sizing, display, float, overflow_x, overflow_y};
 use style::computed_values::{position, text_align};
 use style::context::{SharedStyleContext, StyleContext};
 use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
 use style::properties::ServoComputedValues;
 use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPOSITION};
 use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
 use style::values::computed::LengthOrPercentageOrAuto;
-use util::clamp;
 
 /// Information specific to floated blocks.
 #[derive(Clone, Serialize)]
 pub struct FloatedBlockInfo {
     /// The amount of inline size that is available for the float.
     pub containing_inline_size: Au,
 
     /// The float ceiling, relative to `BaseFlow::position::cur_b` (i.e. the top part of the border
@@ -1529,17 +1528,17 @@ impl BlockFlow {
             if let MaybeAuto::Specified(size) = MaybeAuto::from_style(specified_inline_size,
                                                                       container_size) {
                 match self.fragment.style().get_position().box_sizing {
                     box_sizing::T::border_box => size,
                     box_sizing::T::content_box =>
                         size + self.fragment.border_padding.inline_start_end(),
                 }
             } else {
-                clamp(min_inline_size, available_inline_size, max_inline_size)
+                max(min_inline_size, min(available_inline_size, max_inline_size))
             };
         self.base.position.size.inline = inline_size + self.fragment.margin.inline_start_end();
 
         // If float speculation failed, fixup our layout, and re-layout all the children.
         if self.fragment.margin_box_inline_size() != self.base.position.size.inline {
             debug!("assign_inline_position_for_formatting_context: float speculation failed");
             // Fix-up our own layout.
             // We can't just traverse_flow_tree_preorder ourself, because that would re-run
--- a/servo/components/layout/construct.rs
+++ b/servo/components/layout/construct.rs
@@ -33,16 +33,17 @@ use gfx::display_list::OpaqueNode;
 use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow};
 use inline::{InlineFragmentNodeInfo, LAST_FRAGMENT_OF_ELEMENT};
 use linked_list::prepend_from;
 use list_item::{ListItemFlow, ListStyleTypeContent};
 use multicol::{MulticolColumnFlow, MulticolFlow};
 use parallel;
 use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
 use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
+use servo_config::opts;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::LinkedList;
 use std::marker::PhantomData;
 use std::mem;
 use std::sync::Arc;
 use std::sync::atomic::Ordering;
 use style::computed_values::{caption_side, display, empty_cells, float, list_style_position};
@@ -59,17 +60,16 @@ use table::TableFlow;
 use table_caption::TableCaptionFlow;
 use table_cell::TableCellFlow;
 use table_colgroup::TableColGroupFlow;
 use table_row::TableRowFlow;
 use table_rowgroup::TableRowGroupFlow;
 use table_wrapper::TableWrapperFlow;
 use text::TextRunScanner;
 use traversal::PostorderNodeMutTraversal;
-use util::opts;
 use wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
 
 /// The results of flow construction for a DOM node.
 #[derive(Clone)]
 pub enum ConstructionResult {
     /// This node contributes nothing at all (`display: none`). Alternately, this is what newly
     /// created nodes have their `ConstructionResult` set to.
     None,
--- a/servo/components/layout/context.rs
+++ b/servo/components/layout/context.rs
@@ -12,25 +12,25 @@ use gfx::display_list::WebRenderImageInf
 use gfx::font_cache_thread::FontCacheThread;
 use gfx::font_context::FontContext;
 use heapsize::HeapSizeOf;
 use ipc_channel::ipc;
 use net_traits::image::base::Image;
 use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResponse, ImageState};
 use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder};
 use parking_lot::RwLock;
+use servo_config::opts;
 use servo_url::ServoUrl;
 use std::borrow::Borrow;
 use std::cell::{RefCell, RefMut};
 use std::collections::HashMap;
 use std::hash::BuildHasherDefault;
 use std::rc::Rc;
 use std::sync::{Arc, Mutex};
 use style::context::{LocalStyleContext, StyleContext, SharedStyleContext};
-use util::opts;
 
 struct LocalLayoutContext {
     style_context: LocalStyleContext,
 
     font_context: RefCell<FontContext>,
 }
 
 impl HeapSizeOf for LocalLayoutContext {
--- a/servo/components/layout/display_list_builder.rs
+++ b/servo/components/layout/display_list_builder.rs
@@ -30,16 +30,17 @@ use gfx::display_list::{TextDisplayItem,
 use gfx_traits::{ScrollPolicy, ScrollRootId, StackingContextId};
 use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT};
 use ipc_channel::ipc;
 use list_item::ListItemFlow;
 use model::{self, MaybeAuto, ToGfxMatrix};
 use net_traits::image::base::PixelFormat;
 use net_traits::image_cache_thread::UsePlaceholder;
 use range::Range;
+use servo_config::opts;
 use servo_url::ServoUrl;
 use std::{cmp, f32};
 use std::collections::HashMap;
 use std::default::Default;
 use std::mem;
 use std::sync::Arc;
 use style::computed_values::{background_attachment, background_clip, background_origin};
 use style::computed_values::{background_repeat, background_size, border_style};
@@ -52,17 +53,16 @@ use style::logical_geometry::{LogicalPoi
 use style::properties::{self, ServoComputedValues};
 use style::properties::style_structs;
 use style::servo::restyle_damage::REPAINT;
 use style::values::{self, Either, RGBA, computed};
 use style::values::computed::{Gradient, GradientKind, LengthOrPercentage, LengthOrPercentageOrAuto};
 use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection};
 use style_traits::cursor::Cursor;
 use table_cell::CollapsedBordersForCell;
-use util::opts;
 use webrender_traits::{ColorF, GradientStop};
 
 trait RgbColor {
     fn rgb(r: u8, g: u8, b: u8) -> Self;
 }
 
 impl RgbColor for ColorF {
     fn rgb(r: u8, g: u8, b: u8) -> Self {
--- a/servo/components/layout/lib.rs
+++ b/servo/components/layout/lib.rs
@@ -44,23 +44,23 @@ extern crate range;
 extern crate rayon;
 extern crate script_layout_interface;
 extern crate script_traits;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
 extern crate serde_json;
 #[macro_use] extern crate servo_atoms;
+extern crate servo_config;
 extern crate servo_url;
 extern crate smallvec;
 extern crate style;
 extern crate style_traits;
 extern crate unicode_bidi;
 extern crate unicode_script;
-extern crate util;
 extern crate webrender_traits;
 
 #[macro_use]
 pub mod layout_debug;
 
 pub mod animation;
 mod block;
 pub mod construct;
--- a/servo/components/layout/parallel.rs
+++ b/servo/components/layout/parallel.rs
@@ -8,23 +8,23 @@
 
 #![allow(unsafe_code)]
 
 use context::{LayoutContext, SharedLayoutContext};
 use flow::{self, Flow, MutableFlowUtils, PostorderFlowTraversal, PreorderFlowTraversal};
 use flow_ref::FlowRef;
 use profile_traits::time::{self, TimerMetadata, profile};
 use rayon;
+use servo_config::opts;
 use std::mem;
 use std::sync::atomic::{AtomicIsize, Ordering};
 use style::dom::UnsafeNode;
 use style::parallel::CHUNK_SIZE;
 use traversal::{AssignISizes, BubbleISizes};
 use traversal::AssignBSizes;
-use util::opts;
 
 pub use style::parallel::traverse_dom;
 
 #[allow(dead_code)]
 fn static_assertion(node: UnsafeNode) {
     unsafe {
         let _: UnsafeFlow = ::std::intrinsics::transmute(node);
     }
--- a/servo/components/layout/sequential.rs
+++ b/servo/components/layout/sequential.rs
@@ -10,20 +10,20 @@ use display_list_builder::DisplayListBui
 use euclid::point::Point2D;
 use floats::SpeculatedFloatPlacement;
 use flow::{self, Flow, ImmutableFlowUtils, InorderFlowTraversal, MutableFlowUtils};
 use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
 use flow::IS_ABSOLUTELY_POSITIONED;
 use fragment::FragmentBorderBoxIterator;
 use generated_content::ResolveGeneratedContent;
 use gfx_traits::ScrollRootId;
+use servo_config::opts;
 use style::context::StyleContext;
 use style::servo::restyle_damage::{REFLOW, STORE_OVERFLOW};
 use traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
-use util::opts;
 
 pub use style::sequential::traverse_dom;
 
 pub fn resolve_generated_content(root: &mut Flow, shared_layout_context: &SharedLayoutContext) {
     fn doit(flow: &mut Flow, level: u32, traversal: &mut ResolveGeneratedContent) {
         if !traversal.should_process(flow) {
             return
         }
--- a/servo/components/layout/traversal.rs
+++ b/servo/components/layout/traversal.rs
@@ -6,26 +6,26 @@
 
 use construct::FlowConstructor;
 use context::{LayoutContext, SharedLayoutContext};
 use display_list_builder::DisplayListBuildState;
 use flow::{self, PreorderFlowTraversal};
 use flow::{CAN_BE_FRAGMENTED, Flow, ImmutableFlowUtils, PostorderFlowTraversal};
 use gfx::display_list::OpaqueNode;
 use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
+use servo_config::opts;
 use std::mem;
 use style::atomic_refcell::AtomicRefCell;
 use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
 use style::data::ElementData;
 use style::dom::{TElement, TNode};
 use style::selector_parser::RestyleDamage;
 use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT};
 use style::traversal::{DomTraversalContext, recalc_style_at, remove_from_bloom_filter};
 use style::traversal::PerLevelTraversalData;
-use util::opts;
 use wrapper::{GetRawData, LayoutNodeHelpers, LayoutNodeLayoutData};
 
 pub struct RecalcStyleAndConstructFlows<'lc> {
     context: LayoutContext<'lc>,
     root: OpaqueNode,
 }
 
 #[allow(unsafe_code)]
--- a/servo/components/layout_thread/Cargo.toml
+++ b/servo/components/layout_thread/Cargo.toml
@@ -29,16 +29,17 @@ plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rayon = "0.5"
 script = {path = "../script"}
 script_layout_interface = {path = "../script_layout_interface"}
 script_traits = {path = "../script_traits"}
 selectors = "0.15"
 serde_derive = "0.8"
 serde_json = "0.8"
+servo_config = {path = "../config"}
+servo_geometry = {path = "../geometry"}
 servo_url = {path = "../url"}
 style = {path = "../style"}
-util = {path = "../util"}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive", "ipc"]
--- a/servo/components/layout_thread/lib.rs
+++ b/servo/components/layout_thread/lib.rs
@@ -35,19 +35,20 @@ extern crate parking_lot;
 #[macro_use]
 extern crate profile_traits;
 extern crate rayon;
 extern crate script;
 extern crate script_layout_interface;
 extern crate script_traits;
 extern crate selectors;
 extern crate serde_json;
+extern crate servo_config;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate style;
-extern crate util;
 extern crate webrender_traits;
 
 use app_units::Au;
 use euclid::point::Point2D;
 use euclid::rect::Rect;
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::Size2D;
 use fnv::FnvHasher;
@@ -89,44 +90,44 @@ use profile_traits::time::{TimerMetadata
 use script::layout_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode};
 use script_layout_interface::message::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow};
 use script_layout_interface::reporter::CSSErrorReporter;
 use script_layout_interface::rpc::{LayoutRPC, MarginStyleResponse, NodeOverflowResponse, OffsetParentResponse};
 use script_layout_interface::wrapper_traits::LayoutNode;
 use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
 use script_traits::{StackingContextScrollState, UntrustedNodeAddress};
 use selectors::Element;
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_config::resource_files::read_resource_file;
+use servo_geometry::max_rect;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::HashMap;
 use std::hash::BuildHasherDefault;
 use std::ops::{Deref, DerefMut};
 use std::process;
 use std::sync::{Arc, Mutex, MutexGuard};
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::mpsc::{Receiver, Sender, channel};
+use std::thread;
 use style::animation::Animation;
 use style::context::{LocalStyleContextCreationInfo, ReflowGoal, SharedStyleContext};
 use style::data::StoredRestyleHint;
 use style::dom::{ShowSubtree, ShowSubtreeDataAndPrimaryValues, TElement, TNode};
 use style::error_reporting::{ParseErrorReporter, StdoutErrorReporter};
 use style::logical_geometry::LogicalPoint;
 use style::media_queries::{Device, MediaType};
 use style::parser::ParserContextExtraData;
 use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW};
 use style::stylesheets::{Origin, Stylesheet, UserAgentStylesheets};
 use style::stylist::Stylist;
 use style::thread_state;
 use style::timer::Timer;
 use style::traversal::DomTraversalContext;
-use util::geometry::max_rect;
-use util::opts;
-use util::prefs::PREFS;
-use util::resource_files::read_resource_file;
-use util::thread;
 
 /// Information needed by the layout thread.
 pub struct LayoutThread {
     /// The ID of the pipeline that we belong to.
     id: PipelineId,
 
     /// The URL of the pipeline that we belong to.
     url: ServoUrl,
@@ -224,17 +225,17 @@ pub struct LayoutThread {
 
     // Webrender interface.
     webrender_api: webrender_traits::RenderApi,
 
     /// The timer object to control the timing of the animations. This should
     /// only be a test-mode timer during testing for animations.
     timer: Timer,
 
-    // Number of layout threads. This is copied from `util::opts`, but we'd
+    // Number of layout threads. This is copied from `servo_config::opts`, but we'd
     // rather limit the dependency on that module here.
     layout_threads: usize,
 }
 
 impl LayoutThreadFactory for LayoutThread {
     type Message = Msg;
 
     /// Spawns a new layout thread.
@@ -248,18 +249,17 @@ impl LayoutThreadFactory for LayoutThrea
               script_chan: IpcSender<ConstellationControlMsg>,
               image_cache_thread: ImageCacheThread,
               font_cache_thread: FontCacheThread,
               time_profiler_chan: time::ProfilerChan,
               mem_profiler_chan: mem::ProfilerChan,
               content_process_shutdown_chan: Option<IpcSender<()>>,
               webrender_api_sender: webrender_traits::RenderApiSender,
               layout_threads: usize) {
-        thread::spawn_named(format!("LayoutThread {:?}", id),
-                      move || {
+        thread::Builder::new().name(format!("LayoutThread {:?}", id)).spawn(move || {
             thread_state::initialize(thread_state::LAYOUT);
 
             if let Some(top_level_frame_id) = top_level_frame_id {
                 FrameId::install(top_level_frame_id);
             }
 
             { // Ensures layout thread is destroyed before we send shutdown message
                 let sender = chan.0;
@@ -280,17 +280,17 @@ impl LayoutThreadFactory for LayoutThrea
                 let reporter_name = format!("layout-reporter-{}", id);
                 mem_profiler_chan.run_with_memory_reporting(|| {
                     layout.start();
                 }, reporter_name, sender, Msg::CollectReports);
             }
             if let Some(content_process_shutdown_chan) = content_process_shutdown_chan {
                 let _ = content_process_shutdown_chan.send(());
             }
-        });
+        }).expect("Thread spawning failed");
     }
 }
 
 /// The `LayoutThread` `rw_data` lock must remain locked until the first reflow,
 /// as RPC calls don't make sense until then. Use this in combination with
 /// `LayoutThread::lock_rw_data` and `LayoutThread::return_rw_data`.
 pub enum RWGuard<'a> {
     /// If the lock was previously held, from when the thread started.
--- a/servo/components/net/Cargo.toml
+++ b/servo/components/net/Cargo.toml
@@ -29,22 +29,22 @@ msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
 openssl = "0.7.6"
 openssl-verify = "0.1"
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rustc-serialize = "0.3"
 serde = "0.8"
 serde_derive = "0.8"
+servo_config = {path = "../config"}
 servo_url = {path = "../url"}
 threadpool = "1.0"
 time = "0.1.17"
 unicase = "1.4.0"
 url = {version = "1.2", features = ["heap_size", "rustc-serialize"]}
-util = {path = "../util"}
 uuid = {version = "0.3.1", features = ["v4"]}
 websocket = "0.17"
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["serde_derive", "ipc"]
 
--- a/servo/components/net/chrome_loader.rs
+++ b/servo/components/net/chrome_loader.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+use servo_config::resource_files::resources_dir_path;
 use servo_url::ServoUrl;
 use std::fs::canonicalize;
 use url::percent_encoding::percent_decode;
-use util::resource_files::resources_dir_path;
 
 pub fn resolve_chrome_url(url: &ServoUrl) -> Result<ServoUrl, ()> {
     assert_eq!(url.scheme(), "chrome");
     if url.host_str() != Some("resources") {
         return Err(())
     }
     let resources = canonicalize(resources_dir_path().expect("Error finding resource folder"))
         .expect("Error canonicalizing path to the resources directory");
--- a/servo/components/net/connector.rs
+++ b/servo/components/net/connector.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use hyper::client::Pool;
 use hyper::net::{HttpStream, HttpsConnector, SslClient};
 use openssl::ssl::{SSL_OP_NO_COMPRESSION, SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3, SSL_VERIFY_PEER};
 use openssl::ssl::{Ssl, SslContext, SslMethod, SslStream};
+use servo_config::resource_files::resources_dir_path;
 use std::sync::Arc;
-use util::resource_files::resources_dir_path;
 
 pub type Connector = HttpsConnector<ServoSslClient>;
 
 // The basic logic here is to prefer ciphers with ECDSA certificates, Forward
 // Secrecy, AES GCM ciphers, AES ciphers, and finally 3DES ciphers.
 // A complete discussion of the issues involved in TLS configuration can be found here:
 // https://wiki.mozilla.org/Security/Server_Side_TLS
 const DEFAULT_CIPHERS: &'static str = concat!(
--- a/servo/components/net/content_blocker.rs
+++ b/servo/components/net/content_blocker.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use content_blocker_parser::{RuleList, parse_list};
+use servo_config::resource_files::read_resource_file;
 use std::str;
 use std::sync::Arc;
-use util::resource_files::read_resource_file;
 
 lazy_static! {
     pub static ref BLOCKED_CONTENT_RULES: Arc<Option<RuleList>> = Arc::new(create_rule_list());
 }
 
 fn create_rule_list() -> Option<RuleList> {
     let contents = match read_resource_file("blocked-content.json") {
         Ok(c) => c,
--- a/servo/components/net/filemanager_thread.rs
+++ b/servo/components/net/filemanager_thread.rs
@@ -2,28 +2,28 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use ipc_channel::ipc::IpcSender;
 use mime_guess::guess_mime_type_opt;
 use net_traits::blob_url_store::{BlobBuf, BlobURLStoreError};
 use net_traits::filemanager_thread::{FileManagerResult, FileManagerThreadMsg, FileOrigin, FilterPattern};
 use net_traits::filemanager_thread::{FileManagerThreadError, ReadFileProgress, RelativePos, SelectedFile};
+use servo_config::prefs::PREFS;
 use std::collections::HashMap;
 use std::fs::File;
 use std::io::{Read, Seek, SeekFrom};
 use std::ops::Index;
 use std::path::{Path, PathBuf};
 use std::sync::{Arc, RwLock};
 use std::sync::atomic::{self, AtomicBool, AtomicUsize, Ordering};
+use std::thread;
 #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
 use tinyfiledialogs;
 use url::Url;
-use util::prefs::PREFS;
-use util::thread::spawn_named;
 use uuid::Uuid;
 
 /// The provider of file-dialog UI should implement this trait.
 /// It will be used to initialize a generic FileManager.
 /// For example, we can choose a dummy UI for testing purpose.
 pub trait UIProvider where Self: Sync {
     fn open_file_dialog(&self, path: &str, patterns: Vec<FilterPattern>) -> Option<String>;
 
@@ -124,53 +124,53 @@ impl FileManager {
     }
 
     pub fn read_file(&self,
                      sender: IpcSender<FileManagerResult<ReadFileProgress>>,
                      id: Uuid,
                      check_url_validity: bool,
                      origin: FileOrigin) {
         let store = self.store.clone();
-        spawn_named("read file".to_owned(), move || {
+        thread::Builder::new().name("read file".to_owned()).spawn(move || {
             if let Err(e) = store.try_read_file(&sender, id, check_url_validity,
                                                 origin) {
                 let _ = sender.send(Err(FileManagerThreadError::BlobURLStoreError(e)));
             }
-        })
+        }).expect("Thread spawning failed");
     }
 
     pub fn promote_memory(&self,
                           blob_buf: BlobBuf,
                           set_valid: bool,
                           sender: IpcSender<Result<Uuid, BlobURLStoreError>>,
                           origin: FileOrigin) {
         let store = self.store.clone();
-        spawn_named("transfer memory".to_owned(), move || {
+        thread::Builder::new().name("transfer memory".to_owned()).spawn(move || {
             store.promote_memory(blob_buf, set_valid, sender, origin);
-        })
+        }).expect("Thread spawning failed");
     }
 
     /// Message handler
     pub fn handle<UI>(&self,
                       msg: FileManagerThreadMsg,
                       ui: &'static UI)
         where UI: UIProvider + 'static,
     {
         match msg {
             FileManagerThreadMsg::SelectFile(filter, sender, origin, opt_test_path) => {
                 let store = self.store.clone();
-                spawn_named("select file".to_owned(), move || {
+                thread::Builder::new().name("select file".to_owned()).spawn(move || {
                     store.select_file(filter, sender, origin, opt_test_path, ui);
-                });
+                }).expect("Thread spawning failed");
             }
             FileManagerThreadMsg::SelectFiles(filter, sender, origin, opt_test_paths) => {
                 let store = self.store.clone();
-                spawn_named("select files".to_owned(), move || {
+                thread::Builder::new().name("select files".to_owned()).spawn(move || {
                     store.select_files(filter, sender, origin, opt_test_paths, ui);
-                })
+                }).expect("Thread spawning failed");
             }
             FileManagerThreadMsg::ReadFile(sender, id, check_url_validity, origin) => {
                 self.read_file(sender, id, check_url_validity, origin);
             }
             FileManagerThreadMsg::PromoteMemory(blob_buf, set_valid, sender, origin) => {
                 self.promote_memory(blob_buf, set_valid, sender, origin);
             }
             FileManagerThreadMsg::AddSlicedURLEntry(id, rel_pos, sender, origin) =>{
--- a/servo/components/net/hsts.rs
+++ b/servo/components/net/hsts.rs
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use net_traits::IncludeSubdomains;
 use rustc_serialize::json::decode;
+use servo_config::resource_files::read_resource_file;
 use std::net::{Ipv4Addr, Ipv6Addr};
 use std::str::from_utf8;
 use time;
 use url::Url;
-use util::resource_files::read_resource_file;
 
 #[derive(RustcDecodable, RustcEncodable, Clone)]
 pub struct HstsEntry {
     pub host: String,
     pub include_subdomains: bool,
     pub max_age: Option<u64>,
     pub timestamp: Option<u64>
 }
--- a/servo/components/net/http_loader.rs
+++ b/servo/components/net/http_loader.rs
@@ -42,21 +42,21 @@ use std::collections::HashSet;
 use std::error::Error;
 use std::io::{self, Read, Write};
 use std::iter::FromIterator;
 use std::mem::swap;
 use std::ops::Deref;
 use std::rc::Rc;
 use std::sync::{Arc, RwLock};
 use std::sync::mpsc::{channel, Sender};
+use std::thread;
 use time;
 use time::Tm;
 use unicase::UniCase;
 use url::Origin as UrlOrigin;
-use util::thread::spawn_named;
 use uuid;
 
 fn read_block<R: Read>(reader: &mut R) -> Result<Data, ()> {
     let mut buf = vec![0; 1024];
 
     match reader.read(&mut buf) {
         Ok(len) if len > 0 => {
             buf.truncate(len);
@@ -1066,17 +1066,17 @@ fn http_network_fetch(request: Rc<Reques
     *done_chan = Some((done_sender.clone(), done_receiver));
     let meta = match response.metadata().expect("Response metadata should exist at this stage") {
         FetchMetadata::Unfiltered(m) => m,
         FetchMetadata::Filtered { unsafe_, .. } => unsafe_
     };
     let devtools_sender = context.devtools_chan.clone();
     let meta_status = meta.status.clone();
     let meta_headers = meta.headers.clone();
-    spawn_named(format!("fetch worker thread"), move || {
+    thread::Builder::new().name(format!("fetch worker thread")).spawn(move || {
         match StreamedResponse::from_http_response(res) {
             Ok(mut res) => {
                 *res_body.lock().unwrap() = ResponseBody::Receiving(vec![]);
 
                 if let Some(ref sender) = devtools_sender {
                     if let Some(m) = msg {
                         send_request_to_devtools(m, &sender);
                     }
@@ -1118,17 +1118,17 @@ fn http_network_fetch(request: Rc<Reques
                 }
             }
             Err(_) => {
                 // XXXManishearth we should propagate this error somehow
                 *res_body.lock().unwrap() = ResponseBody::Done(vec![]);
                 let _ = done_sender.send(Data::Done);
             }
         }
-    });
+    }).expect("Thread spawning failed");
 
         // TODO these substeps aren't possible yet
         // Substep 1
 
         // Substep 2
 
     // TODO Determine if response was retrieved over HTTPS
     // TODO Servo needs to decide what ciphers are to be treated as "deprecated"
--- a/servo/components/net/image_cache_thread.rs
+++ b/servo/components/net/image_cache_thread.rs
@@ -6,28 +6,28 @@ use immeta::load_from_buf;
 use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
 use ipc_channel::router::ROUTER;
 use net_traits::{CoreResourceThread, NetworkError, fetch_async, FetchResponseMsg, FetchMetadata, Metadata};
 use net_traits::image::base::{Image, ImageMetadata, PixelFormat, load_from_memory};
 use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheCommand, ImageCacheThread, ImageState};
 use net_traits::image_cache_thread::{ImageCacheResult, ImageOrMetadataAvailable, ImageResponse, UsePlaceholder};
 use net_traits::image_cache_thread::ImageResponder;
 use net_traits::request::{Destination, RequestInit, Type as RequestType};
+use servo_config::resource_files::resources_dir_path;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::HashMap;
 use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::fs::File;
 use std::io::{self, Read};
 use std::mem;
 use std::sync::Arc;
 use std::sync::mpsc::{Receiver, Sender, channel};
+use std::thread;
 use threadpool::ThreadPool;
-use util::resource_files::resources_dir_path;
-use util::thread::spawn_named;
 use webrender_traits;
 
 ///
 /// TODO(gw): Remaining work on image cache:
 ///     * Make use of the prefetch support in various parts of the code.
 ///     * Profile time in GetImageIfAvailable - might be worth caching these results per paint / layout thread.
 ///
 /// MAYBE(Yoric):
@@ -643,14 +643,14 @@ impl ImageCache {
     }
 }
 
 /// Create a new image cache.
 pub fn new_image_cache_thread(core_resource_thread: CoreResourceThread,
                               webrender_api: webrender_traits::RenderApi) -> ImageCacheThread {
     let (ipc_command_sender, ipc_command_receiver) = ipc::channel().unwrap();
 
-    spawn_named("ImageCacheThread".to_owned(), move || {
+    thread::Builder::new().name("ImageCacheThread".to_owned()).spawn(move || {
         ImageCache::run(core_resource_thread, webrender_api, ipc_command_receiver)
-    });
+    }).expect("Thread spawning failed");
 
     ImageCacheThread::new(ipc_command_sender)
 }
--- a/servo/components/net/lib.rs
+++ b/servo/components/net/lib.rs
@@ -30,24 +30,24 @@ extern crate mime_guess;
 extern crate msg;
 extern crate net_traits;
 extern crate openssl;
 extern crate openssl_verify;
 extern crate profile_traits;
 extern crate rustc_serialize;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_config;
 extern crate servo_url;
 extern crate threadpool;
 extern crate time;
 #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
 extern crate tinyfiledialogs;
 extern crate unicase;
 extern crate url;
-extern crate util;
 extern crate uuid;
 extern crate webrender_traits;
 extern crate websocket;
 
 mod blob_loader;
 mod chrome_loader;
 mod connector;
 mod content_blocker;
--- a/servo/components/net/resource_thread.rs
+++ b/servo/components/net/resource_thread.rs
@@ -32,18 +32,18 @@ use std::collections::HashMap;
 use std::error::Error;
 use std::fs::File;
 use std::io::prelude::*;
 use std::ops::Deref;
 use std::path::{Path, PathBuf};
 use std::rc::Rc;
 use std::sync::{Arc, RwLock};
 use std::sync::mpsc::Sender;
+use std::thread;
 use storage_thread::StorageThreadFactory;
-use util::thread::spawn_named;
 use websocket_loader;
 
 const TFD_PROVIDER: &'static TFDProvider = &TFDProvider;
 
 #[derive(Clone)]
 pub struct ResourceGroup {
     cookie_jar: Arc<RwLock<CookieStorage>>,
     auth_cache: Arc<RwLock<AuthCache>>,
@@ -71,28 +71,28 @@ pub fn new_resource_threads(user_agent: 
 /// Create a CoreResourceThread
 pub fn new_core_resource_thread(user_agent: Cow<'static, str>,
                                 devtools_chan: Option<Sender<DevtoolsControlMsg>>,
                                 profiler_chan: ProfilerChan,
                                 config_dir: Option<PathBuf>)
                                 -> (CoreResourceThread, CoreResourceThread) {
     let (public_setup_chan, public_setup_port) = ipc::channel().unwrap();
     let (private_setup_chan, private_setup_port) = ipc::channel().unwrap();
-    spawn_named("ResourceManager".to_owned(), move || {
+    thread::Builder::new().name("ResourceManager".to_owned()).spawn(move || {
         let resource_manager = CoreResourceManager::new(
             user_agent, devtools_chan, profiler_chan
         );
 
         let mut channel_manager = ResourceChannelManager {
             resource_manager: resource_manager,
             config_dir: config_dir,
         };
         channel_manager.start(public_setup_port,
                               private_setup_port);
-    });
+    }).expect("Thread spawning failed");
     (public_setup_chan, private_setup_chan)
 }
 
 struct ResourceChannelManager {
     resource_manager: CoreResourceManager,
     config_dir: Option<PathBuf>,
 }
 
@@ -338,31 +338,31 @@ impl CoreResourceManager {
             hsts_list: group.hsts_list.clone(),
             cookie_jar: group.cookie_jar.clone(),
             auth_cache: group.auth_cache.clone(),
             blocked_content: BLOCKED_CONTENT_RULES.clone(),
         };
         let ua = self.user_agent.clone();
         let dc = self.devtools_chan.clone();
         let filemanager = self.filemanager.clone();
-        spawn_named(format!("fetch thread for {}", init.url), move || {
+        thread::Builder::new().name(format!("fetch thread for {}", init.url)).spawn(move || {
             let request = Request::from_init(init);
             // XXXManishearth: Check origin against pipeline id (also ensure that the mode is allowed)
             // todo load context / mimesniff in fetch
             // todo referrer policy?
             // todo service worker stuff
             let mut target = Some(Box::new(sender) as Box<FetchTaskTarget + Send + 'static>);
             let context = FetchContext {
                 state: http_state,
                 user_agent: ua,
                 devtools_chan: dc,
                 filemanager: filemanager,
             };
             fetch(Rc::new(request), &mut target, &context);
-        })
+        }).expect("Thread spawning failed");
     }
 
     fn websocket_connect(&self,
                          connect: WebSocketCommunicate,
                          connect_data: WebSocketConnectData,
                          resource_grp: &ResourceGroup) {
         websocket_loader::init(connect, connect_data, resource_grp.cookie_jar.clone());
     }
--- a/servo/components/net/storage_thread.rs
+++ b/servo/components/net/storage_thread.rs
@@ -5,31 +5,31 @@
 use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
 use net_traits::storage_thread::{StorageThreadMsg, StorageType};
 use resource_thread;
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::BTreeMap;
 use std::collections::HashMap;
 use std::path::PathBuf;
-use util::thread::spawn_named;
+use std::thread;
 
 const QUOTA_SIZE_LIMIT: usize = 5 * 1024 * 1024;
 
 pub trait StorageThreadFactory {
     fn new(config_dir: Option<PathBuf>) -> Self;
 }
 
 impl StorageThreadFactory for IpcSender<StorageThreadMsg> {
     /// Create a storage thread
     fn new(config_dir: Option<PathBuf>) -> IpcSender<StorageThreadMsg> {
         let (chan, port) = ipc::channel().unwrap();
-        spawn_named("StorageManager".to_owned(), move || {
+        thread::Builder::new().name("StorageManager".to_owned()).spawn(move || {
             StorageManager::new(port, config_dir).start();
-        });
+        }).expect("Thread spawning failed");
         chan
     }
 }
 
 struct StorageManager {
     port: IpcReceiver<StorageThreadMsg>,
     session_data: HashMap<String, (usize, BTreeMap<String, String>)>,
     local_data: HashMap<String, (usize, BTreeMap<String, String>)>,
--- a/servo/components/net/websocket_loader.rs
+++ b/servo/components/net/websocket_loader.rs
@@ -9,17 +9,16 @@ use net_traits::{WebSocketCommunicate, W
 use net_traits::MessageData;
 use net_traits::hosts::replace_hosts;
 use net_traits::unwrap_websocket_protocol;
 use servo_url::ServoUrl;
 use std::ascii::AsciiExt;
 use std::sync::{Arc, Mutex, RwLock};
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::thread;
-use util::thread::spawn_named;
 use websocket::{Client, Message};
 use websocket::header::{Headers, Origin, WebSocketProtocol};
 use websocket::message::Type;
 use websocket::receiver::Receiver;
 use websocket::result::{WebSocketError, WebSocketResult};
 use websocket::sender::Sender;
 use websocket::stream::WebSocketStream;
 use websocket::ws::receiver::Receiver as WSReceiver;
@@ -59,17 +58,17 @@ fn establish_a_websocket_connection(reso
 
     let headers = response.headers.clone();
     let (sender, receiver) = response.begin().split();
     Ok((headers, sender, receiver))
 
 }
 
 pub fn init(connect: WebSocketCommunicate, connect_data: WebSocketConnectData, cookie_jar: Arc<RwLock<CookieStorage>>) {
-    spawn_named(format!("WebSocket connection to {}", connect_data.resource_url), move || {
+    thread::Builder::new().name(format!("WebSocket connection to {}", connect_data.resource_url)).spawn(move || {
         // Step 8: Protocols.
 
         // Step 9.
 
         // URL that we actually fetch from the network, after applying the replacements
         // specified in the hosts file.
         let net_url_result = parse_url(replace_hosts(&connect_data.resource_url).as_url().unwrap());
         let net_url = match net_url_result {
@@ -157,10 +156,10 @@ pub fn init(connect: WebSocketCommunicat
                                 None => Message::close()
                             };
                             ws_sender_outgoing.lock().unwrap().send_message(&message).unwrap();
                         }
                     },
                 }
             }
         });
-    });
+    }).expect("Thread spawning failed");
 }
--- a/servo/components/net_traits/Cargo.toml
+++ b/servo/components/net_traits/Cargo.toml
@@ -6,29 +6,29 @@ license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "net_traits"
 path = "lib.rs"
 
 [dependencies]
 bluetooth_traits = {path = "../bluetooth_traits"}
-util = {path = "../util"}
 msg = {path = "../msg"}
 ipc-channel = "0.5"
 heapsize = "0.3.0"
 heapsize_derive = "0.1"
 hyper = "0.9.9"
 hyper_serde = "0.1.4"
 image = "0.10"
 lazy_static = "0.2"
 log = "0.3.5"
 num-traits = "0.1.32"
 serde = "0.8"
 serde_derive = "0.8"
+servo_config = {path = "../config", features = ["servo"]}
 servo_url = {path = "../url", features = ["servo"]}
 url = {version = "1.2", features = ["heap_size"]}
 websocket = "0.17"
 uuid = { version = "0.3.1", features = ["v4", "serde"] }
 cookie = {version = "0.2.5", features = ["serialize-rustc"]}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
--- a/servo/components/net_traits/lib.rs
+++ b/servo/components/net_traits/lib.rs
@@ -22,19 +22,19 @@ extern crate ipc_channel;
 extern crate lazy_static;
 #[macro_use]
 extern crate log;
 extern crate msg;
 extern crate num_traits;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_config;
 extern crate servo_url;
 extern crate url;
-extern crate util;
 extern crate uuid;
 extern crate webrender_traits;
 extern crate websocket;
 
 use bluetooth_traits::{BluetoothResponseListener, BluetoothResponseResult};
 use cookie_rs::Cookie;
 use filemanager_thread::FileManagerThreadMsg;
 use heapsize::HeapSizeOf;
--- a/servo/components/net_traits/pub_domains.rs
+++ b/servo/components/net_traits/pub_domains.rs
@@ -9,20 +9,20 @@
 //! The list can be updated with `./mach update-pub-domains` from this source:
 //! https://publicsuffix.org/list/
 //!
 //! This implementation is not strictly following the specification of the list. Wildcards are not
 //! restricted to appear only in the leftmost position, but the current list has no such cases so
 //! we don't need to make the code more complex for it. The `mach` update command makes sure that
 //! those cases are not present.
 
+use servo_config::resource_files::read_resource_file;
 use std::collections::HashSet;
 use std::iter::FromIterator;
 use std::str::from_utf8;
-use util::resource_files::read_resource_file;
 
 #[derive(Clone,Debug)]
 pub struct PubDomainRules {
     rules: HashSet<String>,
     wildcards: HashSet<String>,
     exceptions: HashSet<String>,
 }
 
--- a/servo/components/profile/Cargo.toml
+++ b/servo/components/profile/Cargo.toml
@@ -7,23 +7,23 @@ publish = false
 
 [lib]
 name = "profile"
 path = "lib.rs"
 
 [dependencies]
 profile_traits = {path = "../profile_traits"}
 plugins = {path = "../plugins"}
-util = {path = "../util", features = ["servo"]}
 ipc-channel = "0.5"
 heartbeats-simple = "0.3"
 log = "0.3.5"
 serde = "0.8"
 serde_derive = "0.8"
 serde_json = "0.8"
+servo_config = {path = "../config", features = ["servo"]}
 time = "0.1.12"
 
 [target.'cfg(target_os = "macos")'.dependencies]
 task_info = {path = "../../support/rust-task_info"}
 
 [target.'cfg(target_os = "linux")'.dependencies]
 regex = "0.1.55"
 
--- a/servo/components/profile/heartbeats.rs
+++ b/servo/components/profile/heartbeats.rs
@@ -1,23 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 use heartbeats_simple::HeartbeatPow as Heartbeat;
 use heartbeats_simple::HeartbeatPowContext as HeartbeatContext;
 use profile_traits::time::ProfilerCategory;
+use servo_config::opts;
 use std::collections::HashMap;
 use std::env::var_os;
 use std::error::Error;
 use std::fs::File;
 use std::mem;
 use std::path::Path;
-use util::opts;
 
 
 static mut HBS: Option<*mut HashMap<ProfilerCategory, Heartbeat>> = None;
 
 /// Initialize heartbeats
 pub fn init() {
     let mut hbs: HashMap<ProfilerCategory, Heartbeat> = HashMap::new();
     maybe_create_heartbeat(&mut hbs, ProfilerCategory::Compositing);
--- a/servo/components/profile/lib.rs
+++ b/servo/components/profile/lib.rs
@@ -22,19 +22,19 @@ extern crate log;
 #[macro_use]
 extern crate profile_traits;
 #[cfg(target_os = "linux")]
 extern crate regex;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
 extern crate serde_json;
+extern crate servo_config;
 #[cfg(target_os = "macos")]
 extern crate task_info;
 extern crate time as std_time;
-extern crate util;
 
 #[allow(unsafe_code)]
 mod heartbeats;
 #[allow(unsafe_code)]
 pub mod mem;
 pub mod time;
 pub mod trace_dump;
--- a/servo/components/profile/mem.rs
+++ b/servo/components/profile/mem.rs
@@ -8,17 +8,16 @@ use ipc_channel::ipc::{self, IpcReceiver
 use ipc_channel::router::ROUTER;
 use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest};
 use profile_traits::mem::ReportsChan;
 use std::borrow::ToOwned;
 use std::cmp::Ordering;
 use std::collections::HashMap;
 use std::thread;
 use time::duration_from_seconds;
-use util::thread::spawn_named;
 
 pub struct Profiler {
     /// The port through which messages are received.
     pub port: IpcReceiver<ProfilerMsg>,
 
     /// Registered memory reporters.
     reporters: HashMap<String, Reporter>,
 }
@@ -28,32 +27,32 @@ const SYSTEM_HEAP_ALLOCATED_STR: &'stati
 
 impl Profiler {
     pub fn create(period: Option<f64>) -> ProfilerChan {
         let (chan, port) = ipc::channel().unwrap();
 
         // Create the timer thread if a period was provided.
         if let Some(period) = period {
             let chan = chan.clone();
-            spawn_named("Memory profiler timer".to_owned(), move || {
+            thread::Builder::new().name("Memory profiler timer".to_owned()).spawn(move || {
                 loop {
                     thread::sleep(duration_from_seconds(period));
                     if chan.send(ProfilerMsg::Print).is_err() {
                         break;
                     }
                 }
-            });
+            }).expect("Thread spawning failed");
         }
 
         // Always spawn the memory profiler. If there is no timer thread it won't receive regular
         // `Print` events, but it will still receive the other events.
-        spawn_named("Memory profiler".to_owned(), move || {
+        thread::Builder::new().name("Memory profiler".to_owned()).spawn(move || {
             let mut mem_profiler = Profiler::new(port);
             mem_profiler.start();
-        });
+        }).expect("Thread spawning failed");
 
         let mem_profiler_chan = ProfilerChan(chan);
 
         // Register the system memory reporter, which will run on its own thread. It never needs to
         // be unregistered, because as long as the memory profiler is running the system memory
         // reporter can make measurements.
         let (system_reporter_sender, system_reporter_receiver) = ipc::channel().unwrap();
         ROUTER.add_route(system_reporter_receiver.to_opaque(), box |message| {
--- a/servo/components/profile/time.rs
+++ b/servo/components/profile/time.rs
@@ -4,31 +4,30 @@
 
 //! Timing functions.
 
 use heartbeats;
 use ipc_channel::ipc::{self, IpcReceiver};
 use profile_traits::energy::{energy_interval_ms, read_energy_uj};
 use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, TimerMetadata};
 use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
+use servo_config::opts::OutputOptions;
 use std::{f64, thread, u32, u64};
 use std::borrow::ToOwned;
 use std::cmp::Ordering;
 use std::collections::BTreeMap;
 use std::error::Error;
 use std::fs;
 use std::fs::File;
 use std::io::{self, Write};
 use std::path;
 use std::path::Path;
 use std::time::Duration;
 use std_time::precise_time_ns;
 use trace_dump::TraceDump;
-use util::opts::OutputOptions;
-use util::thread::spawn_named;
 
 pub trait Formattable {
     fn format(&self, output: &Option<OutputOptions>) -> String;
 }
 
 impl Formattable for Option<TimerMetadata> {
     fn format(&self, output: &Option<OutputOptions>) -> String {
         match *self {
@@ -171,67 +170,67 @@ pub struct Profiler {
 
 impl Profiler {
     pub fn create(output: &Option<OutputOptions>, file_path: Option<String>) -> ProfilerChan {
         let (chan, port) = ipc::channel().unwrap();
         match *output {
             Some(ref option) => {
                 // Spawn the time profiler thread
                 let outputoption = option.clone();
-                spawn_named("Time profiler".to_owned(), move || {
+                thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
                     let trace = file_path.as_ref()
                         .map(path::Path::new)
                         .map(fs::File::create)
                         .map(|res| TraceDump::new(res.unwrap()));
                     let mut profiler = Profiler::new(port, trace, Some(outputoption));
                     profiler.start();
-                });
+                }).expect("Thread spawning failed");
                 // decide if we need to spawn the timer thread
                 match option {
                     &OutputOptions::FileName(_) => { /* no timer thread needed */ },
                     &OutputOptions::Stdout(period) => {
                         // Spawn a timer thread
                         let chan = chan.clone();
-                        spawn_named("Time profiler timer".to_owned(), move || {
+                        thread::Builder::new().name("Time profiler timer".to_owned()).spawn(move || {
                             loop {
                                 thread::sleep(duration_from_seconds(period));
                                 if chan.send(ProfilerMsg::Print).is_err() {
                                     break;
                                 }
                             }
-                        });
+                        }).expect("Thread spawning failed");
                     },
                 }
             },
             None => {
                 // this is when the -p option hasn't been specified
                 if file_path.is_some() {
                     // Spawn the time profiler
-                    spawn_named("Time profiler".to_owned(), move || {
+                    thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
                         let trace = file_path.as_ref()
                             .map(path::Path::new)
                             .map(fs::File::create)
                             .map(|res| TraceDump::new(res.unwrap()));
                         let mut profiler = Profiler::new(port, trace, None);
                         profiler.start();
-                    });
+                    }).expect("Thread spawning failed");
                 } else {
                     // No-op to handle messages when the time profiler is not printing:
-                    spawn_named("Time profiler".to_owned(), move || {
+                    thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
                         loop {
                             match port.recv() {
                                 Err(_) => break,
                                 Ok(ProfilerMsg::Exit(chan)) => {
                                     let _ = chan.send(());
                                     break;
                                 },
                                 _ => {}
                             }
                         }
-                    });
+                    }).expect("Thread spawning failed");
                 }
             }
         }
 
         heartbeats::init();
         let profiler_chan = ProfilerChan(chan);
 
         // only spawn the application-level profiler thread if its heartbeat is enabled
@@ -242,17 +241,17 @@ impl Profiler {
             let profiler_chan = profiler_chan.clone();
             // min of 1 heartbeat/sec, max of 20 should provide accurate enough power/energy readings
             // waking up more frequently allows the thread to end faster on exit
             const SLEEP_MS: u32 = 10;
             const MIN_ENERGY_INTERVAL_MS: u32 = 50;
             const MAX_ENERGY_INTERVAL_MS: u32 = 1000;
             let interval_ms = enforce_range(MIN_ENERGY_INTERVAL_MS, MAX_ENERGY_INTERVAL_MS, energy_interval_ms());
             let loop_count: u32 = (interval_ms as f32 / SLEEP_MS as f32).ceil() as u32;
-            spawn_named("Application heartbeat profiler".to_owned(), move || {
+            thread::Builder::new().name("Application heartbeat profiler".to_owned()).spawn(move || {
                 let mut start_time = precise_time_ns();
                 let mut start_energy = read_energy_uj();
                 loop {
                     for _ in 0..loop_count {
                         if run_ap_thread() {
                             thread::sleep(Duration::from_millis(SLEEP_MS as u64))
                         } else {
                             return
@@ -267,17 +266,17 @@ impl Profiler {
                                                    (start_time, end_time),
                                                    (start_energy, end_energy))) {
                         Ok(_) => {},
                         Err(_) => return,
                     };
                     start_time = end_time;
                     start_energy = end_energy;
                 }
-            });
+            }).expect("Thread spawning failed");
         }
 
         profiler_chan
     }
 
     pub fn new(port: IpcReceiver<ProfilerMsg>, trace: Option<TraceDump>, output: Option<OutputOptions>) -> Profiler {
         Profiler {
             port: port,
--- a/servo/components/profile_traits/Cargo.toml
+++ b/servo/components/profile_traits/Cargo.toml
@@ -15,12 +15,12 @@ energy-profiling = ["energymon", "energy
 [dependencies]
 ipc-channel = "0.5"
 energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true}
 energy-monitor = {version = "0.2.0", optional = true}
 log = "0.3.5"
 plugins = {path = "../plugins"}
 serde = "0.8"
 serde_derive = "0.8"
+servo_config = {path = "../config"}
 signpost = {git = "https://github.com/pcwalton/signpost.git"}
 time = "0.1.12"
-util = {path = "../util"}
 
--- a/servo/components/profile_traits/lib.rs
+++ b/servo/components/profile_traits/lib.rs
@@ -13,15 +13,15 @@
 #![deny(unsafe_code)]
 
 extern crate ipc_channel;
 #[macro_use]
 extern crate log;
 extern crate serde;
 #[macro_use]
 extern crate serde_derive;
+extern crate servo_config;
 extern crate signpost;
-extern crate util;
 
 #[allow(unsafe_code)]
 pub mod energy;
 pub mod mem;
 pub mod time;
--- a/servo/components/profile_traits/time.rs
+++ b/servo/components/profile_traits/time.rs
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 extern crate time as std_time;
 
 use energy::read_energy_uj;
 use ipc_channel::ipc::IpcSender;
 use self::std_time::precise_time_ns;
+use servo_config::opts;
 use signpost;
-use util::opts;
 
 #[derive(PartialEq, Clone, PartialOrd, Eq, Ord, Debug, Deserialize, Serialize)]
 pub struct TimerMetadata {
     pub url:         String,
     pub iframe:      TimerMetadataFrameType,
     pub incremental: TimerMetadataReflowType,
 }
 
new file mode 100644
--- /dev/null
+++ b/servo/components/remutex/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "servo_remutex"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+publish = false
+
+[lib]
+name = "servo_remutex"
+path = "lib.rs"
+
+[dependencies]
+lazy_static = "0.2"
+log = "0.3.5"
rename from servo/components/util/remutex.rs
rename to servo/components/remutex/lib.rs
--- a/servo/components/util/remutex.rs
+++ b/servo/components/remutex/lib.rs
@@ -5,16 +5,22 @@
 //! An implementation of re-entrant mutexes.
 //!
 //! Re-entrant mutexes are like mutexes, but where it is expected
 //! that a single thread may own a lock more than once.
 
 //! It provides the same interface as https://github.com/rust-lang/rust/blob/master/src/libstd/sys/common/remutex.rs
 //! so if those types are ever exported, we should be able to replace this implemtation.
 
+#![feature(nonzero)]
+
+extern crate core;
+#[macro_use] extern crate lazy_static;
+#[macro_use] extern crate log;
+
 use core::nonzero::NonZero;
 use std::cell::{Cell, UnsafeCell};
 use std::ops::Deref;
 use std::sync::{LockResult, Mutex, MutexGuard, PoisonError, TryLockError, TryLockResult};
 use std::sync::atomic::{AtomicUsize, Ordering};
 
 /// A type for thread ids.
 
--- a/servo/components/script/Cargo.toml
+++ b/servo/components/script/Cargo.toml
@@ -65,23 +65,24 @@ ref_filter_map = "1.0.1"
 ref_slice = "1.0"
 regex = "0.1.43"
 rustc-serialize = "0.3"
 script_layout_interface = {path = "../script_layout_interface"}
 script_traits = {path = "../script_traits"}
 selectors = "0.15"
 serde = "0.8"
 servo_atoms = {path = "../atoms"}
+servo_config = {path = "../config", features = ["servo"] }
+servo_geometry = {path = "../geometry" }
 servo_url = {path = "../url", features = ["servo"] }
 smallvec = "0.1"
 style = {path = "../style"}
 style_traits = {path = "../style_traits"}
 time = "0.1.12"
 url = {version = "1.2", features = ["heap_size", "query_encoding"]}
-util = {path = "../util"}
 uuid = {version = "0.3.1", features = ["v4"]}
 websocket = "0.17"
 xml5ever = {version = "0.2", features = ["unstable"]}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
 default_features = false
 features = ["nightly", "serde_derive", "ipc"]
--- a/servo/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/servo/components/script/dom/bindings/codegen/CodegenRust.py
@@ -5598,17 +5598,17 @@ def generate_imports(config, cgthings, d
         'dom::bindings::str::USVString',
         'dom::bindings::weakref::DOM_WEAK_SLOT',
         'dom::bindings::weakref::WeakBox',
         'dom::bindings::weakref::WeakReferenceable',
         'dom::browsingcontext::BrowsingContext',
         'dom::globalscope::GlobalScope',
         'mem::heap_size_of_raw_self_and_children',
         'libc',
-        'util::prefs::PREFS',
+        'servo_config::prefs::PREFS',
         'std::borrow::ToOwned',
         'std::cmp',
         'std::mem',
         'std::num',
         'std::os',
         'std::panic',
         'std::ptr',
         'std::str',
--- a/servo/components/script/dom/bindings/conversions.rs
+++ b/servo/components/script/dom/bindings/conversions.rs
@@ -51,18 +51,18 @@ use js::jsapi::{JSObject, JSString, JS_G
 use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetObjectAsArrayBuffer, JS_GetObjectAsArrayBufferView};
 use js::jsapi::{JS_GetReservedSlot, JS_GetTwoByteStringCharsAndLength};
 use js::jsapi::{JS_IsArrayObject, JS_NewStringCopyN, JS_StringHasLatin1Chars};
 use js::jsapi::{MutableHandleValue, Type};
 use js::jsval::{ObjectValue, StringValue};
 use js::rust::{ToString, get_object_class, is_dom_class, is_dom_object, maybe_wrap_value};
 use libc;
 use num_traits::Float;
+use servo_config::opts;
 use std::{char, mem, ptr, slice};
-use util::opts;
 
 /// A trait to check whether a given `JSObject` implements an IDL interface.
 pub trait IDLInterface {
     /// Returns whether the given DOM class derives that interface.
     fn derives(&'static DOMClass) -> bool;
 }
 
 /// A trait to mark an IDL interface as deriving from another one.
--- a/servo/components/script/dom/bindings/guard.rs
+++ b/servo/components/script/dom/bindings/guard.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Machinery to conditionally expose things.
 
 use js::jsapi::{HandleObject, JSContext};
-use util::prefs::PREFS;
+use servo_config::prefs::PREFS;
 
 /// A container with a condition.
 pub struct Guard<T: Clone + Copy> {
     condition: Condition,
     value: T,
 }
 
 impl<T: Clone + Copy> Guard<T> {
--- a/servo/components/script/dom/characterdata.rs
+++ b/servo/components/script/dom/characterdata.rs
@@ -14,18 +14,18 @@ use dom::bindings::inheritance::Castable
 use dom::bindings::js::{LayoutJS, Root};
 use dom::bindings::str::DOMString;
 use dom::comment::Comment;
 use dom::document::Document;
 use dom::element::Element;
 use dom::node::{Node, NodeDamage};
 use dom::processinginstruction::ProcessingInstruction;
 use dom::text::Text;
+use servo_config::opts;
 use std::cell::Ref;
-use util::opts;
 
 // https://dom.spec.whatwg.org/#characterdata
 #[dom_struct]
 pub struct CharacterData {
     node: Node,
     data: DOMRefCell<DOMString>,
 }
 
--- a/servo/components/script/dom/create.rs
+++ b/servo/components/script/dom/create.rs
@@ -73,17 +73,17 @@ use dom::htmltextareaelement::HTMLTextAr
 use dom::htmltimeelement::HTMLTimeElement;
 use dom::htmltitleelement::HTMLTitleElement;
 use dom::htmltrackelement::HTMLTrackElement;
 use dom::htmlulistelement::HTMLUListElement;
 use dom::htmlunknownelement::HTMLUnknownElement;
 use dom::htmlvideoelement::HTMLVideoElement;
 use dom::svgsvgelement::SVGSVGElement;
 use html5ever_atoms::{Prefix, QualName};
-use util::prefs::PREFS;
+use servo_config::prefs::PREFS;
 
 fn create_svg_element(name: QualName,
                       prefix: Option<DOMString>,
                       document: &Document)
                       -> Root<Element> {
     assert!(name.ns == ns!(svg));
 
     macro_rules! make(
--- a/servo/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/servo/components/script/dom/dedicatedworkerglobalscope.rs
@@ -33,18 +33,18 @@ use rand::random;
 use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, StackRootTLS, get_reports, new_rt_and_cx};
 use script_runtime::ScriptThreadEventCategory::WorkerEvent;
 use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
 use servo_url::ServoUrl;
 use std::mem::replace;
 use std::sync::{Arc, Mutex};
 use std::sync::atomic::AtomicBool;
 use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
+use std::thread;
 use style::thread_state;
-use util::thread::spawn_named;
 
 /// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
 /// value for the duration of this object's lifetime. This ensures that the related Worker
 /// object only lives as long as necessary (ie. while events are being executed), while
 /// providing a reference that can be cloned freely.
 struct AutoWorkerReset<'a> {
     workerscope: &'a DedicatedWorkerGlobalScope,
     old_worker: Option<TrustedWorkerAddress>,
@@ -155,17 +155,17 @@ impl DedicatedWorkerGlobalScope {
                             own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
                             receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>,
                             worker_load_origin: WorkerScriptLoadOrigin,
                             closing: Arc<AtomicBool>) {
         let serialized_worker_url = worker_url.to_string();
         let name = format!("WebWorker for {}", serialized_worker_url);
         let top_level_frame_id = FrameId::installed();
 
-        spawn_named(name, move || {
+        thread::Builder::new().name(name).spawn(move || {
             thread_state::initialize(thread_state::SCRIPT | thread_state::IN_WORKER);
 
             if let Some(top_level_frame_id) = top_level_frame_id {
                 FrameId::install(top_level_frame_id);
             }
 
             let roots = RootCollection::new();
             let _stack_roots_tls = StackRootTLS::new(&roots);
@@ -238,17 +238,17 @@ impl DedicatedWorkerGlobalScope {
             scope.upcast::<GlobalScope>().mem_profiler_chan().run_with_memory_reporting(|| {
                 while let Ok(event) = global.receive_event() {
                     if scope.is_closing() {
                         break;
                     }
                     global.handle_event(event);
                 }
             }, reporter_name, parent_sender, CommonScriptMsg::CollectReports);
-        });
+        }).expect("Thread spawning failed");
     }
 
     pub fn script_chan(&self) -> Box<ScriptChan + Send> {
         box WorkerThreadWorkerChan {
             sender: self.own_sender.clone(),
             worker: self.worker.borrow().as_ref().unwrap().clone(),
         }
     }
--- a/servo/components/script/dom/document.rs
+++ b/servo/components/script/dom/document.rs
@@ -108,16 +108,17 @@ use origin::Origin;
 use script_layout_interface::message::{Msg, ReflowQueryType};
 use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
 use script_thread::{MainThreadScriptMsg, Runnable};
 use script_traits::{AnimationState, CompositorEvent, MouseButton, MouseEventType, MozBrowserEvent};
 use script_traits::{ScriptMsg as ConstellationMsg, TouchpadPressurePhase};
 use script_traits::{TouchEventType, TouchId};
 use script_traits::UntrustedNodeAddress;
 use servo_atoms::Atom;
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::ascii::AsciiExt;
 use std::borrow::ToOwned;
 use std::cell::{Cell, Ref, RefMut};
 use std::collections::HashMap;
 use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::default::Default;
 use std::iter::once;
@@ -128,17 +129,16 @@ use std::time::{Duration, Instant};
 use style::attr::AttrValue;
 use style::context::ReflowGoal;
 use style::restyle_hints::RestyleHint;
 use style::selector_parser::{RestyleDamage, Snapshot};
 use style::str::{split_html_space_chars, str_join};
 use style::stylesheets::Stylesheet;
 use time;
 use url::percent_encoding::percent_decode;
-use util::prefs::PREFS;
 
 pub enum TouchEventResult {
     Processed(bool),
     Forwarded,
 }
 
 #[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
 pub enum IsHTMLDocument {
--- a/servo/components/script/dom/filereader.rs
+++ b/servo/components/script/dom/filereader.rs
@@ -29,19 +29,19 @@ use js::jsapi::JSContext;
 use js::jsval::{self, JSVal};
 use js::typedarray::Uint8Array;
 use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
 use script_thread::RunnableWrapper;
 use servo_atoms::Atom;
 use std::cell::Cell;
 use std::ptr;
 use std::sync::Arc;
+use std::thread;
 use task_source::TaskSource;
 use task_source::file_reading::{FileReadingTaskSource, FileReadingRunnable, FileReadingTask};
-use util::thread::spawn_named;
 
 #[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
 pub enum FileReaderFunction {
     ReadAsText,
     ReadAsDataUrl,
     ReadAsArrayBuffer,
 }
 
@@ -396,19 +396,20 @@ impl FileReader {
 
         let fr = Trusted::new(self);
         let gen_id = self.generation_id.get();
 
         let global = self.global();
         let wrapper = global.get_runnable_wrapper();
         let task_source = global.file_reading_task_source();
 
-        spawn_named("file reader async operation".to_owned(), move || {
+        thread::Builder::new().name("file reader async operation".to_owned()).spawn(move || {
             perform_annotated_read_operation(gen_id, load_data, blob_contents, fr, task_source, wrapper)
-        });
+        }).expect("Thread spawning failed");
+
         Ok(())
     }
 
     fn change_ready_state(&self, state: FileReaderReadyState) {
         self.ready_state.set(state);
     }
 }
 
--- a/servo/components/script/dom/htmlanchorelement.rs
+++ b/servo/components/script/dom/htmlanchorelement.rs
@@ -23,20 +23,20 @@ use dom::htmlimageelement::HTMLImageElem
 use dom::mouseevent::MouseEvent;
 use dom::node::{Node, document_from_node, window_from_node};
 use dom::urlhelper::UrlHelper;
 use dom::virtualmethods::VirtualMethods;
 use html5ever_atoms::LocalName;
 use net_traits::ReferrerPolicy;
 use num_traits::ToPrimitive;
 use script_traits::MozBrowserEvent;
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::default::Default;
 use style::attr::AttrValue;
-use util::prefs::PREFS;
 
 #[dom_struct]
 pub struct HTMLAnchorElement {
     htmlelement: HTMLElement,
     rel_list: MutNullableJS<DOMTokenList>,
     url: DOMRefCell<Option<ServoUrl>>,
 }
 
--- a/servo/components/script/dom/htmliframeelement.rs
+++ b/servo/components/script/dom/htmliframeelement.rs
@@ -43,23 +43,23 @@ use js::jsval::{NullValue, UndefinedValu
 use msg::constellation_msg::{FrameType, FrameId, PipelineId, TraversalDirection};
 use net_traits::response::HttpsState;
 use script_layout_interface::message::ReflowQueryType;
 use script_thread::{ScriptThread, Runnable};
 use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, LoadData};
 use script_traits::{MozBrowserEvent, NewLayoutInfo, ScriptMsg as ConstellationMsg};
 use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
 use servo_atoms::Atom;
+use servo_config::prefs::PREFS;
+use servo_config::servo_version;
 use servo_url::ServoUrl;
 use std::cell::Cell;
 use style::attr::{AttrValue, LengthOrPercentageOrAuto};
 use style::context::ReflowGoal;
 use task_source::TaskSource;
-use util::prefs::PREFS;
-use util::servo_version;
 
 bitflags! {
     #[derive(JSTraceable, HeapSizeOf)]
     flags SandboxAllowance: u8 {
         const ALLOW_NOTHING = 0x00,
         const ALLOW_SAME_ORIGIN = 0x01,
         const ALLOW_TOP_NAVIGATION = 0x02,
         const ALLOW_FORMS = 0x04,
--- a/servo/components/script/dom/htmlmetaelement.rs
+++ b/servo/components/script/dom/htmlmetaelement.rs
@@ -14,16 +14,17 @@ use dom::cssstylesheet::CSSStyleSheet;
 use dom::document::Document;
 use dom::element::{AttributeMutation, Element};
 use dom::htmlelement::HTMLElement;
 use dom::htmlheadelement::HTMLHeadElement;
 use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
 use dom::virtualmethods::VirtualMethods;
 use html5ever_atoms::LocalName;
 use parking_lot::RwLock;
+use servo_config::prefs::PREFS;
 use std::ascii::AsciiExt;
 use std::sync::Arc;
 use std::sync::atomic::AtomicBool;
 use style::attr::AttrValue;
 use style::str::HTML_SPACE_CHARACTERS;
 use style::stylesheets::{Stylesheet, CssRule, CssRules, Origin};
 use style::viewport::ViewportRule;
 
@@ -84,17 +85,17 @@ impl HTMLMetaElement {
 
             if name == "referrer" {
                 self.apply_referrer();
             }
         }
     }
 
     fn apply_viewport(&self) {
-        if !::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) {
+        if !PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) {
             return;
         }
         let element = self.upcast::<Element>();
         if let Some(content) = element.get_attribute(&ns!(), &local_name!("content")).r() {
             let content = content.value();
             if !content.is_empty() {
                 if let Some(translated_rule) = ViewportRule::from_meta(&**content) {
                     *self.stylesheet.borrow_mut() = Some(Arc::new(Stylesheet {
--- a/servo/components/script/dom/mouseevent.rs
+++ b/servo/components/script/dom/mouseevent.rs
@@ -9,19 +9,19 @@ use dom::bindings::error::Fallible;
 use dom::bindings::inheritance::Castable;
 use dom::bindings::js::{MutNullableJS, Root, RootedReference};
 use dom::bindings::reflector::reflect_dom_object;
 use dom::bindings::str::DOMString;
 use dom::event::{Event, EventBubbles, EventCancelable};
 use dom::eventtarget::EventTarget;
 use dom::uievent::UIEvent;
 use dom::window::Window;
+use servo_config::prefs::PREFS;
 use std::cell::Cell;
 use std::default::Default;
-use util::prefs::PREFS;
 
 #[dom_struct]
 pub struct MouseEvent {
     uievent: UIEvent,
     screen_x: Cell<i32>,
     screen_y: Cell<i32>,
     client_x: Cell<i32>,
     client_y: Cell<i32>,
--- a/servo/components/script/dom/navigatorinfo.rs
+++ b/servo/components/script/dom/navigatorinfo.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use dom::bindings::str::DOMString;
-use util::opts;
+use servo_config::opts;
 
 pub fn Product() -> DOMString {
     DOMString::from("Gecko")
 }
 
 pub fn TaintEnabled() -> bool {
     false
 }
--- a/servo/components/script/dom/serviceworkerglobalscope.rs
+++ b/servo/components/script/dom/serviceworkerglobalscope.rs
@@ -23,23 +23,22 @@ use ipc_channel::router::ROUTER;
 use js::jsapi::{JS_SetInterruptCallback, JSAutoCompartment, JSContext};
 use js::jsval::UndefinedValue;
 use js::rust::Runtime;
 use net_traits::{load_whole_resource, IpcSend, CustomResponseMediator};
 use net_traits::request::{CredentialsMode, Destination, RequestInit, Type as RequestType};
 use rand::random;
 use script_runtime::{CommonScriptMsg, StackRootTLS, get_reports, new_rt_and_cx, ScriptChan};
 use script_traits::{TimerEvent, WorkerGlobalScopeInit, ScopeThings, ServiceWorkerMsg, WorkerScriptLoadOrigin};
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
 use std::thread;
 use std::time::Duration;
 use style::thread_state::{self, IN_WORKER, SCRIPT};
-use util::prefs::PREFS;
-use util::thread::spawn_named;
 
 /// Messages used to control service worker event loop
 pub enum ServiceWorkerScriptMsg {
     /// Message common to all workers
     CommonWorker(WorkerScriptMsg),
     // Message to request a custom response by the service worker
     Response(CustomResponseMediator)
 }
@@ -146,17 +145,17 @@ impl ServiceWorkerGlobalScope {
                             swmanager_sender: IpcSender<ServiceWorkerMsg>,
                             scope_url: ServoUrl) {
         let ScopeThings { script_url,
                           init,
                           worker_load_origin,
                           .. } = scope_things;
 
         let serialized_worker_url = script_url.to_string();
-        spawn_named(format!("ServiceWorker for {}", serialized_worker_url), move || {
+        thread::Builder::new().name(format!("ServiceWorker for {}", serialized_worker_url)).spawn(move || {
             thread_state::initialize(SCRIPT | IN_WORKER);
             let roots = RootCollection::new();
             let _stack_roots_tls = StackRootTLS::new(&roots);
 
             let WorkerScriptLoadOrigin { referrer_url, referrer_policy, pipeline_id } = worker_load_origin;
 
             let request = RequestInit {
                 url: script_url.clone(),
@@ -197,32 +196,32 @@ impl ServiceWorkerGlobalScope {
 
             unsafe {
                 // Handle interrupt requests
                 JS_SetInterruptCallback(scope.runtime(), Some(interrupt_callback));
             }
 
             scope.execute_script(DOMString::from(source));
             // Service workers are time limited
-            spawn_named("SWTimeoutThread".to_owned(), move || {
+            thread::Builder::new().name("SWTimeoutThread".to_owned()).spawn(move || {
                 let sw_lifetime_timeout = PREFS.get("dom.serviceworker.timeout_seconds").as_u64().unwrap();
                 thread::sleep(Duration::new(sw_lifetime_timeout, 0));
                 let _ = timer_chan.send(());
-            });
+            }).expect("Thread spawning failed");
 
             global.dispatch_activate();
             let reporter_name = format!("service-worker-reporter-{}", random::<u64>());
             scope.upcast::<GlobalScope>().mem_profiler_chan().run_with_memory_reporting(|| {
                 while let Ok(event) = global.receive_event() {
                     if !global.handle_event(event) {
                         break;
                     }
                 }
             }, reporter_name, scope.script_chan(), CommonScriptMsg::CollectReports);
-        });
+        }).expect("Thread spawning failed");
     }
 
     fn handle_event(&self, event: MixedMessage) -> bool {
         match event {
             MixedMessage::FromDevtools(msg) => {
                 match msg {
                     DevtoolScriptControlMsg::EvaluateJS(_pipe_id, string, sender) =>
                         devtools::handle_evaluate_js(self.upcast(), string, sender),
--- a/servo/components/script/dom/servoparser/mod.rs
+++ b/servo/components/script/dom/servoparser/mod.rs
@@ -27,20 +27,20 @@ use hyper::header::ContentType;
 use hyper::mime::{Mime, SubLevel, TopLevel};
 use hyper_serde::Serde;
 use msg::constellation_msg::PipelineId;
 use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError};
 use network_listener::PreInvoke;
 use profile_traits::time::{TimerMetadata, TimerMetadataFrameType};
 use profile_traits::time::{TimerMetadataReflowType, ProfilerCategory, profile};
 use script_thread::ScriptThread;
+use servo_config::resource_files::read_resource_file;
 use servo_url::ServoUrl;
 use std::cell::Cell;
 use std::mem;
-use util::resource_files::read_resource_file;
 
 mod html;
 mod xml;
 
 #[dom_struct]
 /// The parser maintains two input streams: one for input from script through
 /// document.write(), and one for input from network.
 ///
--- a/servo/components/script/dom/testbinding.rs
+++ b/servo/components/script/dom/testbinding.rs
@@ -32,21 +32,21 @@ use dom::blob::{Blob, BlobImpl};
 use dom::globalscope::GlobalScope;
 use dom::promise::Promise;
 use dom::promisenativehandler::{PromiseNativeHandler, Callback};
 use dom::url::URL;
 use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject, JSAutoCompartment};
 use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray};
 use js::jsval::{JSVal, NullValue};
 use script_traits::MsDuration;
+use servo_config::prefs::PREFS;
 use std::borrow::ToOwned;
 use std::ptr;
 use std::rc::Rc;
 use timers::OneshotTimerCallback;
-use util::prefs::PREFS;
 
 #[dom_struct]
 pub struct TestBinding {
     reflector_: Reflector,
     url: MutableWeakRef<URL>,
 }
 
 impl TestBinding {
--- a/servo/components/script/dom/userscripts.rs
+++ b/servo/components/script/dom/userscripts.rs
@@ -4,21 +4,21 @@
 
 use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
 use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
 use dom::bindings::inheritance::Castable;
 use dom::bindings::js::RootedReference;
 use dom::bindings::str::DOMString;
 use dom::htmlheadelement::HTMLHeadElement;
 use dom::node::Node;
+use servo_config::opts;
+use servo_config::resource_files::resources_dir_path;
 use std::borrow::ToOwned;
 use std::fs::read_dir;
 use std::path::PathBuf;
-use util::opts;
-use util::resource_files::resources_dir_path;
 
 
 pub fn load_script(head: &HTMLHeadElement) {
     if let Some(ref path_str) = opts::get().userscripts {
         let node = head.upcast::<Node>();
         let first_child = node.GetFirstChild();
         let doc = node.owner_doc();
 
--- a/servo/components/script/dom/window.rs
+++ b/servo/components/script/dom/window.rs
@@ -72,16 +72,19 @@ use script_layout_interface::rpc::Resolv
 use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, ScriptThreadEventCategory};
 use script_thread::{MainThreadScriptChan, MainThreadScriptMsg, Runnable, RunnableWrapper};
 use script_thread::SendableMainThreadScriptChan;
 use script_traits::{ConstellationControlMsg, LoadData, MozBrowserEvent, UntrustedNodeAddress};
 use script_traits::{DocumentState, TimerEvent, TimerEventId};
 use script_traits::{ScriptMsg as ConstellationMsg, TimerEventRequest, WindowSizeData, WindowSizeType};
 use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
 use servo_atoms::Atom;
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_geometry::{f32_rect_to_au_rect, max_rect};
 use servo_url::ServoUrl;
 use std::ascii::AsciiExt;
 use std::borrow::ToOwned;
 use std::cell::Cell;
 use std::collections::{HashMap, HashSet};
 use std::default::Default;
 use std::io::{Write, stderr, stdout};
 use std::rc::Rc;
@@ -101,19 +104,16 @@ use task_source::file_reading::FileReadi
 use task_source::history_traversal::HistoryTraversalTaskSource;
 use task_source::networking::NetworkingTaskSource;
 use task_source::user_interaction::UserInteractionTaskSource;
 use time;
 use timers::{IsInterval, TimerCallback};
 #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
 use tinyfiledialogs::{self, MessageBoxIcon};
 use url::Position;
-use util::geometry::{self, max_rect};
-use util::opts;
-use util::prefs::PREFS;
 use webdriver_handlers::jsval_to_webdriver;
 
 /// Current state of the window object
 #[derive(JSTraceable, Copy, Clone, Debug, PartialEq, HeapSizeOf)]
 enum WindowState {
     Alive,
     Zombie,     // Pipeline is closed, but the window hasn't been GCed yet.
 }
@@ -1408,23 +1408,23 @@ impl Window {
 
     pub fn steal_resize_event(&self) -> Option<(WindowSizeData, WindowSizeType)> {
         let event = self.resize_event.get();
         self.resize_event.set(None);
         event
     }
 
     pub fn set_page_clip_rect_with_new_viewport(&self, viewport: Rect<f32>) -> bool {
-        let rect = geometry::f32_rect_to_au_rect(viewport.clone());
+        let rect = f32_rect_to_au_rect(viewport.clone());
         self.current_viewport.set(rect);
         // We use a clipping rectangle that is five times the size of the of the viewport,
         // so that we don't collect display list items for areas too far outside the viewport,
         // but also don't trigger reflows every time the viewport changes.
         static VIEWPORT_EXPANSION: f32 = 2.0; // 2 lengths on each side plus original length is 5 total.
-        let proposed_clip_rect = geometry::f32_rect_to_au_rect(
+        let proposed_clip_rect = f32_rect_to_au_rect(
             viewport.inflate(viewport.size.width * VIEWPORT_EXPANSION,
             viewport.size.height * VIEWPORT_EXPANSION));
         let clip_rect = self.page_clip_rect.get();
         if proposed_clip_rect == clip_rect {
             return false;
         }
 
         let had_clip_rect = clip_rect != max_rect();
--- a/servo/components/script/dom/xmlhttprequest.rs
+++ b/servo/components/script/dom/xmlhttprequest.rs
@@ -48,28 +48,28 @@ use js::jsapi::JS_ClearPendingException;
 use js::jsval::{JSVal, NullValue, UndefinedValue};
 use net_traits::{FetchMetadata, FilteredMetadata};
 use net_traits::{FetchResponseListener, NetworkError, ReferrerPolicy};
 use net_traits::CoreResourceMsg::Fetch;
 use net_traits::request::{CredentialsMode, Destination, RequestInit, RequestMode};
 use net_traits::trim_http_whitespace;
 use network_listener::{NetworkListener, PreInvoke};
 use servo_atoms::Atom;
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::ascii::AsciiExt;
 use std::borrow::ToOwned;
 use std::cell::Cell;
 use std::default::Default;
 use std::str;
 use std::sync::{Arc, Mutex};
 use task_source::networking::NetworkingTaskSource;
 use time;
 use timers::{OneshotTimerCallback, OneshotTimerHandle};
 use url::Position;
-use util::prefs::PREFS;
 
 #[derive(JSTraceable, PartialEq, Copy, Clone, HeapSizeOf)]
 enum XMLHttpRequestState {
     Unsent = 0,
     Opened = 1,
     HeadersReceived = 2,
     Loading = 3,
     Done = 4,
--- a/servo/components/script/lib.rs
+++ b/servo/components/script/lib.rs
@@ -78,27 +78,28 @@ extern crate ref_filter_map;
 extern crate ref_slice;
 extern crate regex;
 extern crate rustc_serialize;
 extern crate script_layout_interface;
 extern crate script_traits;
 extern crate selectors;
 extern crate serde;
 #[macro_use] extern crate servo_atoms;
+#[macro_use] extern crate servo_config;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate smallvec;
 #[macro_use]
 extern crate style;
 extern crate style_traits;
 extern crate time;
 #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
 extern crate tinyfiledialogs;
 extern crate url;
 #[macro_use]
-extern crate util;
 extern crate uuid;
 extern crate webrender_traits;
 extern crate websocket;
 extern crate xml5ever;
 
 mod body;
 pub mod clipboard_provider;
 mod devtools;
--- a/servo/components/script/script_runtime.rs
+++ b/servo/components/script/script_runtime.rs
@@ -20,28 +20,28 @@ use js::jsapi::{JSGCInvocationKind, JSGC
 use js::jsapi::{JSGCMode, JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption};
 use js::jsapi::{JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled};
 use js::jsapi::{JSObject, RuntimeOptionsRef, SetPreserveWrapperCallback, SetEnqueuePromiseJobCallback};
 use js::panic::wrap_panic;
 use js::rust::Runtime;
 use msg::constellation_msg::PipelineId;
 use profile_traits::mem::{Report, ReportKind, ReportsChan};
 use script_thread::{Runnable, STACK_ROOTS, trace_thread};
+use servo_config::opts;
+use servo_config::prefs::PREFS;
 use std::cell::Cell;
 use std::io::{Write, stdout};
 use std::marker::PhantomData;
 use std::os;
 use std::os::raw::c_void;
 use std::panic::AssertUnwindSafe;
 use std::ptr;
 use std::rc::Rc;
 use style::thread_state;
 use time::{Tm, now};
-use util::opts;
-use util::prefs::PREFS;
 
 /// Common messages used to control the event loops in both the script and the worker
 pub enum CommonScriptMsg {
     /// Requests that the script thread measure its memory usage. The results are sent back via the
     /// supplied channel.
     CollectReports(ReportsChan),
     /// Generic message that encapsulates event handling.
     RunnableMsg(ScriptThreadEventCategory, Box<Runnable + Send>),
--- a/servo/components/script/script_thread.rs
+++ b/servo/components/script/script_thread.rs
@@ -86,39 +86,39 @@ use script_traits::{CompositorEvent, Con
 use script_traits::{InitialScriptState, LayoutMsg, LoadData, MouseButton, MouseEventType, MozBrowserEvent};
 use script_traits::{NewLayoutInfo, ScriptMsg as ConstellationMsg};
 use script_traits::{ScriptThreadFactory, TimerEvent, TimerEventRequest, TimerSource};
 use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WindowSizeData, WindowSizeType};
 use script_traits::CompositorEvent::{KeyEvent, MouseButtonEvent, MouseMoveEvent, ResizeEvent};
 use script_traits::CompositorEvent::{TouchEvent, TouchpadPressureEvent};
 use script_traits::webdriver_msg::WebDriverScriptCommand;
 use serviceworkerjob::{Job, JobQueue, AsyncJobHandler, FinishJobHandler, InvokeType, SettleType};
+use servo_config::opts;
 use servo_url::ServoUrl;
 use std::cell::Cell;
 use std::collections::{hash_map, HashMap, HashSet};
 use std::option::Option;
 use std::ptr;
 use std::rc::Rc;
 use std::result::Result;
 use std::sync::{Arc, Mutex};
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::mpsc::{Receiver, Select, Sender, channel};
+use std::thread;
 use style::context::ReflowGoal;
 use style::dom::{TNode, UnsafeNode};
 use style::thread_state;
 use task_source::TaskSource;
 use task_source::dom_manipulation::{DOMManipulationTask, DOMManipulationTaskSource};
 use task_source::file_reading::FileReadingTaskSource;
 use task_source::history_traversal::HistoryTraversalTaskSource;
 use task_source::networking::NetworkingTaskSource;
 use task_source::user_interaction::{UserInteractionTask, UserInteractionTaskSource};
 use time::Tm;
 use url::Position;
-use util::opts;
-use util::thread;
 use webdriver_handlers;
 
 thread_local!(pub static STACK_ROOTS: Cell<Option<RootCollectionPtr>> = Cell::new(None));
 thread_local!(static SCRIPT_THREAD_ROOT: Cell<Option<*const ScriptThread>> = Cell::new(None));
 
 pub unsafe fn trace_thread(tr: *mut JSTracer) {
     SCRIPT_THREAD_ROOT.with(|root| {
         if let Some(script_thread) = root.get() {
@@ -514,18 +514,17 @@ impl ScriptThreadFactory for ScriptThrea
 
     fn create(state: InitialScriptState,
               load_data: LoadData)
               -> (Sender<message::Msg>, Receiver<message::Msg>) {
         let (script_chan, script_port) = channel();
 
         let (sender, receiver) = channel();
         let layout_chan = sender.clone();
-        thread::spawn_named(format!("ScriptThread {:?}", state.id),
-                            move || {
+        thread::Builder::new().name(format!("ScriptThread {:?}", state.id)).spawn(move || {
             thread_state::initialize(thread_state::SCRIPT);
             PipelineNamespace::install(state.pipeline_namespace_id);
             FrameId::install(state.top_level_frame_id);
             let roots = RootCollection::new();
             let _stack_roots_tls = StackRootTLS::new(&roots);
             let id = state.id;
             let frame_id = state.frame_id;
             let parent_info = state.parent_info;
@@ -548,17 +547,17 @@ impl ScriptThreadFactory for ScriptThrea
             let reporter_name = format!("script-reporter-{}", id);
             mem_profiler_chan.run_with_memory_reporting(|| {
                 script_thread.start();
                 let _ = script_thread.content_process_shutdown_chan.send(());
             }, reporter_name, script_chan, CommonScriptMsg::CollectReports);
 
             // This must always be the very last operation performed before the thread completes
             failsafe.neuter();
-        });
+        }).expect("Thread spawning failed");
 
         (sender, receiver)
     }
 }
 
 impl ScriptThread {
     pub fn page_headers_available(id: &PipelineId, metadata: Option<Metadata>)
                                   -> Option<Root<ServoParser>> {
--- a/servo/components/script/serviceworker_manager.rs
+++ b/servo/components/script/serviceworker_manager.rs
@@ -11,21 +11,21 @@ use devtools_traits::{DevtoolsPageInfo, 
 use dom::abstractworker::WorkerScriptMsg;
 use dom::bindings::structuredclone::StructuredCloneData;
 use dom::serviceworkerglobalscope::{ServiceWorkerGlobalScope, ServiceWorkerScriptMsg};
 use dom::serviceworkerregistration::longest_prefix_match;
 use ipc_channel::ipc::{self, IpcSender};
 use ipc_channel::router::ROUTER;
 use net_traits::{CustomResponseMediator, CoreResourceMsg};
 use script_traits::{ServiceWorkerMsg, ScopeThings, SWManagerMsg, SWManagerSenders, DOMMessage};
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::collections::HashMap;
 use std::sync::mpsc::{channel, Sender, Receiver, RecvError};
-use util::prefs::PREFS;
-use util::thread::spawn_named;
+use std::thread;
 
 enum Message {
     FromResource(CustomResponseMediator),
     FromConstellation(ServiceWorkerMsg)
 }
 
 pub struct ServiceWorkerManager {
     // map of registered service worker descriptors
@@ -55,21 +55,21 @@ impl ServiceWorkerManager {
 
     pub fn spawn_manager(sw_senders: SWManagerSenders) {
         let (own_sender, from_constellation_receiver) = ipc::channel().unwrap();
         let (resource_chan, resource_port) = ipc::channel().unwrap();
         let from_constellation = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(from_constellation_receiver);
         let resource_port = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(resource_port);
         let _ = sw_senders.resource_sender.send(CoreResourceMsg::NetworkMediator(resource_chan));
         let _ = sw_senders.swmanager_sender.send(SWManagerMsg::OwnSender(own_sender.clone()));
-        spawn_named("ServiceWorkerManager".to_owned(), move || {
+        thread::Builder::new().name("ServiceWorkerManager".to_owned()).spawn(move || {
             ServiceWorkerManager::new(own_sender,
                                       from_constellation,
                                       resource_port).handle_message();
-        });
+        }).expect("Thread spawning failed");
     }
 
     pub fn get_matching_scope(&self, load_url: &ServoUrl) -> Option<ServoUrl> {
         for scope in self.registered_workers.keys() {
             if longest_prefix_match(&scope, load_url) {
                 return Some(scope.clone());
             }
         }
--- a/servo/components/script/timers.rs
+++ b/servo/components/script/timers.rs
@@ -13,22 +13,22 @@ use dom::testbinding::TestBindingCallbac
 use dom::xmlhttprequest::XHRTimeoutCallback;
 use euclid::length::Length;
 use heapsize::HeapSizeOf;
 use ipc_channel::ipc::IpcSender;
 use js::jsapi::{HandleValue, Heap};
 use js::jsval::{JSVal, UndefinedValue};
 use script_traits::{MsDuration, precise_time_ms};
 use script_traits::{TimerEvent, TimerEventId, TimerEventRequest, TimerSource};
+use servo_config::prefs::PREFS;
 use std::cell::Cell;
 use std::cmp::{self, Ord, Ordering};
 use std::collections::HashMap;
 use std::default::Default;
 use std::rc::Rc;
-use util::prefs::PREFS;
 
 #[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)]
 pub struct OneshotTimerHandle(i32);
 
 #[derive(JSTraceable, HeapSizeOf)]
 #[privatize]
 pub struct OneshotTimers {
     js_timers: JsTimers,
--- a/servo/components/servo/Cargo.toml
+++ b/servo/components/servo/Cargo.toml
@@ -45,20 +45,20 @@ msg = {path = "../msg"}
 net = {path = "../net"}
 net_traits = {path = "../net_traits"}
 plugins = {path = "../plugins", optional = true}
 profile = {path = "../profile"}
 profile_traits = {path = "../profile_traits"}
 script = {path = "../script"}
 script_layout_interface = {path = "../script_layout_interface"}
 script_traits = {path = "../script_traits"}
+servo_config = {path = "../config"}
 servo_url = {path = "../url"}
 style = {path = "../style", features = ["servo"]}
 url = "1.2"
-util = {path = "../util"}
 webdriver_server = {path = "../webdriver_server", optional = true}
 
 [dependencies.webrender]
 git = "https://github.com/servo/webrender"
 default-features = false
 features = ["serde_derive"]
 
 [dependencies.webrender_traits]
--- a/servo/components/servo/lib.rs
+++ b/servo/components/servo/lib.rs
@@ -40,20 +40,19 @@ pub extern crate layout_thread;
 pub extern crate msg;
 pub extern crate net;
 pub extern crate net_traits;
 pub extern crate profile;
 pub extern crate profile_traits;
 pub extern crate script;
 pub extern crate script_traits;
 pub extern crate script_layout_interface;
+pub extern crate servo_config;
 pub extern crate servo_url;
 pub extern crate style;
-pub extern crate url;
-pub extern crate util;
 
 #[cfg(feature = "webdriver")]
 extern crate webdriver_server;
 
 extern crate webrender;
 extern crate webrender_traits;
 
 #[cfg(feature = "webdriver")]
@@ -83,27 +82,29 @@ use log::{Log, LogMetadata, LogRecord};
 use net::image_cache_thread::new_image_cache_thread;
 use net::resource_thread::new_resource_threads;
 use net_traits::IpcSend;
 use profile::mem as profile_mem;
 use profile::time as profile_time;
 use profile_traits::mem;
 use profile_traits::time;
 use script_traits::{ConstellationMsg, SWManagerSenders, ScriptMsg};
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_config::resource_files::resources_dir_path;
 use servo_url::ServoUrl;
 use std::borrow::Cow;
 use std::cmp::max;
 use std::path::PathBuf;
 use std::rc::Rc;
 use std::sync::mpsc::Sender;
-use util::opts;
-use util::prefs::PREFS;
-use util::resource_files::resources_dir_path;
 
 pub use gleam::gl;
+pub use servo_config as config;
+pub use servo_url as url;
 
 /// The in-process interface to Servo.
 ///
 /// It does everything necessary to render the web, primarily
 /// orchestrating the interaction between JavaScript, CSS layout,
 /// rendering, and the client window.
 ///
 /// Clients create a `Browser` for a given reference-counted type
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -45,22 +45,22 @@ phf = "0.7.20"
 quickersort = "2.0.0"
 rand = "0.3"
 rayon = "0.5"
 rustc-serialize = "0.3"
 selectors = "0.15"
 serde = {version = "0.8", optional = true}
 serde_derive = {version = "0.8", optional = true}
 servo_atoms = {path = "../atoms", optional = true}
+servo_config = {path = "../config"}
 smallvec = "0.1"
 style_traits = {path = "../style_traits"}
 servo_url = {path = "../url"}
 time = "0.1"
 unicode-segmentation = "0.1.2"
-util = {path = "../util"}
 plugins = {path = "../plugins", optional = true}
 
 [dependencies.num_cpus]
 optional = true
 version = "1.0"
 
 [target.'cfg(windows)'.dependencies]
 kernel32-sys = "0.2"
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -75,24 +75,24 @@ extern crate phf;
 extern crate quickersort;
 extern crate rayon;
 extern crate rustc_serialize;
 extern crate selectors;
 #[cfg(feature = "servo")]
 extern crate serde;
 #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
 #[cfg(feature = "servo")] #[macro_use] extern crate servo_atoms;
+extern crate servo_config;
 extern crate servo_url;
 extern crate smallvec;
 #[macro_use]
 extern crate style_traits;
 extern crate time;
 #[allow(unused_extern_crates)]
 extern crate unicode_segmentation;
-extern crate util;
 
 pub mod animation;
 pub mod atomic_refcell;
 pub mod attr;
 pub mod bezier;
 pub mod bloom;
 pub mod cache;
 pub mod cascade_info;
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -16,23 +16,23 @@ use data::{ComputedStyle, ElementData, E
 use dom::{TElement, TNode, UnsafeNode};
 use properties::{CascadeFlags, ComputedValues, SHAREABLE, SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP, cascade};
 use properties::longhands::display::computed_value as display;
 use rule_tree::StrongRuleNode;
 use selector_parser::{PseudoElement, RestyleDamage, SelectorImpl};
 use selectors::MatchAttr;
 use selectors::bloom::BloomFilter;
 use selectors::matching::{AFFECTED_BY_PSEUDO_ELEMENTS, MatchingReason, StyleRelations};
+use servo_config::opts;
 use sink::ForgetfulSink;
 use std::collections::HashMap;
 use std::hash::BuildHasherDefault;
 use std::slice::IterMut;
 use std::sync::Arc;
 use stylist::ApplicableDeclarationBlock;
-use util::opts;
 
 fn create_common_style_affecting_attributes_from_element<E: TElement>(element: &E)
                                                          -> CommonStyleAffectingAttributes {
     let mut flags = CommonStyleAffectingAttributes::empty();
     for attribute_info in &common_style_affecting_attributes() {
         match attribute_info.mode {
             CommonStyleAffectingAttributeMode::IsPresent(flag) => {
                 if element.has_attr(&ns!(), &attribute_info.attr_name) {
--- a/servo/components/style/parallel.rs
+++ b/servo/components/style/parallel.rs
@@ -3,20 +3,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Implements parallel traversal over the DOM tree.
 //!
 //! This code is highly unsafe. Keep this file small and easy to audit.
 
 use dom::{OpaqueNode, TElement, TNode, UnsafeNode};
 use rayon;
+use servo_config::opts;
 use std::sync::atomic::Ordering;
 use traversal::{DomTraversalContext, PerLevelTraversalData, PreTraverseToken};
 use traversal::{STYLE_SHARING_CACHE_HITS, STYLE_SHARING_CACHE_MISSES};
-use util::opts;
 
 pub const CHUNK_SIZE: usize = 64;
 
 pub fn traverse_dom<N, C>(root: N::ConcreteElement,
                           known_root_dom_depth: Option<usize>,
                           shared_context: &C::SharedContext,
                           token: PreTraverseToken,
                           queue: &rayon::ThreadPool)
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -23,16 +23,17 @@ use error_reporting::ParseErrorReporter;
 #[cfg(feature = "servo")] use euclid::side_offsets::SideOffsets2D;
 use euclid::size::Size2D;
 use computed_values;
 use font_metrics::FontMetricsProvider;
 #[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSPropertyID;
 #[cfg(feature = "servo")] use logical_geometry::{LogicalMargin, PhysicalSide};
 use logical_geometry::WritingMode;
 use parser::{Parse, ParserContext, ParserContextExtraData};
+#[cfg(feature = "servo")] use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use style_traits::ToCss;
 use stylesheets::Origin;
 #[cfg(feature = "servo")] use values::Either;
 use values::{HasViewportPercentage, computed};
 use cascade_info::CascadeInfo;
 use rule_tree::StrongRuleNode;
 #[cfg(feature = "servo")] use values::specified::BorderStyle;
@@ -841,17 +842,17 @@ impl PropertyDeclaration {
                             }
                         % endif
                         % if property.internal:
                             if context.stylesheet_origin != Origin::UserAgent {
                                 return PropertyDeclarationParseResult::UnknownProperty
                             }
                         % endif
                         % if property.experimental and product == "servo":
-                            if !::util::prefs::PREFS.get("${property.experimental}")
+                            if !PREFS.get("${property.experimental}")
                                 .as_boolean().unwrap_or(false) {
                                 return PropertyDeclarationParseResult::ExperimentalProperty
                             }
                         % endif
                         match longhands::${property.ident}::parse_declared(context, input) {
                             Ok(value) => {
                                 result_list.push(PropertyDeclaration::${property.camel_case}(value));
                                 PropertyDeclarationParseResult::ValidOrIgnoredDeclaration
@@ -873,17 +874,17 @@ impl PropertyDeclaration {
                         }
                     % endif
                     % if shorthand.internal:
                         if context.stylesheet_origin != Origin::UserAgent {
                             return PropertyDeclarationParseResult::UnknownProperty
                         }
                     % endif
                     % if shorthand.experimental and product == "servo":
-                        if !::util::prefs::PREFS.get("${shorthand.experimental}")
+                        if !PREFS.get("${shorthand.experimental}")
                             .as_boolean().unwrap_or(false) {
                             return PropertyDeclarationParseResult::ExperimentalProperty
                         }
                     % endif
                     match input.try(|i| CSSWideKeyword::parse(context, i)) {
                         Ok(CSSWideKeyword::InheritKeyword) => {
                             % for sub_property in shorthand.sub_properties:
                                 result_list.push(
--- a/servo/components/style/stylesheets.rs
+++ b/servo/components/style/stylesheets.rs
@@ -13,16 +13,17 @@ use error_reporting::ParseErrorReporter;
 use font_face::{FontFaceRule, parse_font_face_block};
 use keyframes::{Keyframe, parse_keyframe_list};
 use media_queries::{Device, MediaList, parse_media_query_list};
 use parking_lot::RwLock;
 use parser::{ParserContext, ParserContextExtraData, log_css_error};
 use properties::{PropertyDeclarationBlock, parse_property_declaration_list};
 use selector_parser::{SelectorImpl, SelectorParser};
 use selectors::parser::SelectorList;
+use servo_config::prefs::PREFS;
 use servo_url::ServoUrl;
 use std::cell::Cell;
 use std::fmt;
 use std::sync::Arc;
 use std::sync::atomic::{AtomicBool, Ordering};
 use style_traits::ToCss;
 use stylist::FnvHashMap;
 use viewport::ViewportRule;
@@ -718,17 +719,17 @@ impl<'a, 'b> AtRuleParser for NestedRule
             "media" => {
                 let media_queries = parse_media_query_list(input);
                 Ok(AtRuleType::WithBlock(AtRulePrelude::Media(Arc::new(RwLock::new(media_queries)))))
             },
             "font-face" => {
                 Ok(AtRuleType::WithBlock(AtRulePrelude::FontFace))
             },
             "viewport" => {
-                if ::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) ||
+                if PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) ||
                    cfg!(feature = "gecko") {
                     Ok(AtRuleType::WithBlock(AtRulePrelude::Viewport))
                 } else {
                     Err(())
                 }
             },
             "keyframes" => {
                 let name = match input.next() {
--- a/servo/components/style/traversal.rs
+++ b/servo/components/style/traversal.rs
@@ -9,22 +9,22 @@ use bloom::StyleBloom;
 use context::{LocalStyleContext, SharedStyleContext, StyleContext};
 use data::{ElementData, StoredRestyleHint};
 use dom::{OpaqueNode, TElement, TNode};
 use matching::{MatchMethods, StyleSharingResult};
 use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_SELF};
 use selector_parser::RestyleDamage;
 use selectors::Element;
 use selectors::matching::StyleRelations;
+use servo_config::opts;
 use std::borrow::Borrow;
 use std::cell::RefCell;
 use std::mem;
 use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
 use stylist::Stylist;
-use util::opts;
 
 /// Every time we do another layout, the old bloom filters are invalid. This is
 /// detected by ticking a generation number every layout.
 pub type Generation = u32;
 
 /// Style sharing candidate cache stats. These are only used when
 /// `-Z style-sharing-stats` is given.
 pub static STYLE_SHARING_CACHE_HITS: AtomicUsize = ATOMIC_USIZE_INIT;
--- a/servo/components/url/Cargo.toml
+++ b/servo/components/url/Cargo.toml
@@ -6,17 +6,17 @@ license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "servo_url"
 path = "lib.rs"
 
 [features]
 servo = ["heapsize", "heapsize_derive", "serde", "serde_derive",
-         "url/heap_size"]
+         "url/heap_size", "url/serde"]
 
 
 [dependencies]
 url = "1.2"
 heapsize = {version = "0.3.0", optional = true}
 heapsize_derive = {version = "0.1", optional = true}
 serde = {version = "0.8", optional = true}
 serde_derive = {version = "0.8", optional = true}
deleted file mode 100644
--- a/servo/components/util/thread.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-use std::thread;
-
-pub fn spawn_named<F>(name: String, f: F)
-    where F: FnOnce() + Send + 'static
-{
-    thread::Builder::new().name(name).spawn(f).expect("Thread spawn failed");
-}
--- a/servo/components/webdriver_server/Cargo.toml
+++ b/servo/components/webdriver_server/Cargo.toml
@@ -17,13 +17,13 @@ image = "0.10"
 ipc-channel = "0.5"
 log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
 plugins = {path = "../plugins"}
 regex = "0.1.55"
 rustc-serialize = "0.3.4"
 script_traits = {path = "../script_traits"}
+servo_config = {path = "../config", features = ["servo"]}
 servo_url = {path = "../url", features = ["servo"]}
 url = {version = "1.2", features = ["heap_size"]}
-util = {path = "../util"}
 uuid = { version = "0.3.1", features = ["v4"] }
 webdriver = "0.15"
--- a/servo/components/webdriver_server/lib.rs
+++ b/servo/components/webdriver_server/lib.rs
@@ -17,18 +17,18 @@ extern crate image;
 extern crate ipc_channel;
 #[macro_use]
 extern crate log;
 extern crate msg;
 extern crate net_traits;
 extern crate regex;
 extern crate rustc_serialize;
 extern crate script_traits;
+extern crate servo_config;
 extern crate servo_url;
-extern crate util;
 extern crate uuid;
 extern crate webdriver;
 
 mod keys;
 
 use euclid::Size2D;
 use hyper::method::Method::{self, Post};
 use image::{DynamicImage, ImageFormat, RgbImage};
@@ -37,25 +37,24 @@ use keys::keycodes_to_keys;
 use msg::constellation_msg::{FrameId, PipelineId, TraversalDirection};
 use net_traits::image::base::PixelFormat;
 use regex::Captures;
 use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
 use rustc_serialize::json::{Json, ToJson};
 use script_traits::{ConstellationMsg, LoadData, WebDriverCommandMsg};
 use script_traits::webdriver_msg::{LoadStatus, WebDriverCookieError, WebDriverFrameId};
 use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult, WebDriverScriptCommand};
+use servo_config::prefs::{PREFS, PrefValue};
 use servo_url::ServoUrl;
 use std::borrow::ToOwned;
 use std::collections::BTreeMap;
 use std::net::{SocketAddr, SocketAddrV4};
 use std::sync::mpsc::Sender;
 use std::thread;
 use std::time::Duration;
-use util::prefs::{PREFS, PrefValue};
-use util::thread::spawn_named;
 use uuid::Uuid;
 use webdriver::command::{AddCookieParameters, GetParameters, JavascriptCommandParameters};
 use webdriver::command::{LocatorParameters, Parameters};
 use webdriver::command::{SendKeysParameters, SwitchToFrameParameters, TimeoutsParameters};
 use webdriver::command::{WebDriverCommand, WebDriverExtensionCommand, WebDriverMessage};
 use webdriver::command::WindowSizeParameters;
 use webdriver::common::{Date, LocatorStrategy, Nullable, WebElement};
 use webdriver::error::{ErrorStatus, WebDriverError, WebDriverResult};
@@ -83,23 +82,23 @@ fn cookie_msg_to_cookie(cookie: cookie_r
         },
         secure: cookie.secure,
         httpOnly: cookie.httponly,
     }
 }
 
 pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
     let handler = Handler::new(constellation_chan);
-    spawn_named("WebdriverHttpServer".to_owned(), move || {
+    thread::Builder::new().name("WebdriverHttpServer".to_owned()).spawn(move || {
         let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
         match server::start(SocketAddr::V4(address), handler, extension_routes()) {
             Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
             Err(_) => panic!("Unable to start WebDriver HTTPD server"),
          }
-    });
+    }).expect("Thread spawning failed");
 }
 
 struct WebDriverSession {
     id: Uuid,
     frame_id: Option<FrameId>
 }
 
 struct Handler {
--- a/servo/ports/cef/Cargo.toml
+++ b/servo/ports/cef/Cargo.toml
@@ -26,18 +26,19 @@ gleam = "0.2.8"
 glutin_app = {path = "../glutin"}
 libc = "0.2"
 libservo = {path = "../../components/servo"}
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 msg = {path = "../../components/msg"}
 net_traits = {path = "../../components/net_traits"}
 plugins = {path = "../../components/plugins"}
 script_traits = {path = "../../components/script_traits"}
+servo_config = {path = "../../components/config"}
+servo_geometry = {path = "../../components/geometry"}
 servo_url = {path = "../../components/url"}
 style_traits = {path = "../../components/style_traits"}
-util = {path = "../../components/util"}
 
 [target.'cfg(target_os="macos")'.dependencies]
 objc = "0.2"
 cocoa = "0.5"
 
 [target.'cfg(target_os="linux")'.dependencies]
 x11 = "2.3"
--- a/servo/ports/cef/browser.rs
+++ b/servo/ports/cef/browser.rs
@@ -5,27 +5,27 @@
 use browser_host::{ServoCefBrowserHost, ServoCefBrowserHostExtensions};
 use eutil::Downcast;
 use frame::{ServoCefFrame, ServoCefFrameExtensions};
 use interfaces::{CefBrowser, CefBrowserHost, CefClient, CefFrame, CefRequestContext};
 use interfaces::{cef_browser_t, cef_browser_host_t, cef_client_t, cef_frame_t};
 use interfaces::{cef_request_context_t};
 use servo::Browser;
 use types::{cef_browser_settings_t, cef_string_t, cef_window_info_t, cef_window_handle_t};
-use util::thread::spawn_named;
 use window;
 use wrappers::CefWrap;
 
 use compositing::windowing::{WindowNavigateMsg, WindowEvent};
 use glutin_app;
 use libc::c_int;
 use std::cell::{Cell, RefCell};
 use std::ptr;
 use std::rc::Rc;
 use std::sync::atomic::{AtomicIsize, Ordering};
+use std::thread;
 
 thread_local!(pub static ID_COUNTER: AtomicIsize = AtomicIsize::new(0));
 thread_local!(pub static BROWSERS: RefCell<Vec<CefBrowser>> = RefCell::new(vec!()));
 
 pub enum ServoBrowser {
     Invalid,
     OnScreen(Browser<glutin_app::window::Window>),
     OffScreen(Browser<window::Window>),
@@ -288,25 +288,25 @@ cef_static_method_impls! {
                                        url: *const cef_string_t,
                                        _browser_settings: *const cef_browser_settings_t,
                                        _request_context: *mut cef_request_context_t)
                                        -> c_int {{
         let client: CefClient = client;
         let _browser_settings: &cef_browser_settings_t = _browser_settings;
         let _request_context: CefRequestContext = _request_context;
         browser_host_create(window_info, client, url, false);
-        spawn_named("async_browser_creation".to_owned(), move || {
+        thread::Builder::new().name("async_browser_creation".to_owned()).spawn(move || {
             window::app_wakeup();
-        });
+        }).expect("Thread spawning failed");
         1i32
     }}
     fn cef_browser_host_create_browser_sync(window_info: *const cef_window_info_t,
                                             client: *mut cef_client_t,
                                             url: *const cef_string_t,
                                             _browser_settings: *const cef_browser_settings_t,
                                             _request_context: *mut cef_request_context_t)
                                             -> *mut cef_browser_t {{
         let client: CefClient = client;
         let _browser_settings: &cef_browser_settings_t = _browser_settings;
         let _request_context: CefRequestContext = _request_context;
         browser_host_create(window_info, client, url, true)
     }}
-}
\ No newline at end of file
+}
--- a/servo/ports/cef/core.rs
+++ b/servo/ports/cef/core.rs
@@ -4,19 +4,19 @@
 
 use command_line::command_line_init;
 use interfaces::cef_app_t;
 use types::{cef_main_args_t, cef_settings_t};
 use window::init_window;
 
 use browser;
 use libc::{c_char, c_int, c_void};
+use servo_config::opts;
 use std::ffi;
 use std::str;
-use util::opts;
 
 const MAX_RENDERING_THREADS: usize = 128;
 
 //static HOME_URL: &'static str = "http://s27.postimg.org/vqbtrolyr/servo.jpg";
 
 static CEF_API_HASH_UNIVERSAL: &'static [u8] = b"8efd129f4afc344bd04b2feb7f73a149b6c4e27f\0";
 #[cfg(target_os="windows")]
 static CEF_API_HASH_PLATFORM: &'static [u8] = b"5c7f3e50ff5265985d11dc1a466513e25748bedd\0";
--- a/servo/ports/cef/lib.rs
+++ b/servo/ports/cef/lib.rs
@@ -19,22 +19,23 @@ extern crate servo;
 extern crate compositing;
 
 extern crate euclid;
 extern crate gfx_traits;
 extern crate gleam;
 extern crate glutin_app;
 extern crate rustc_unicode;
 extern crate script_traits;
+extern crate servo_config;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate style_traits;
 
 extern crate net_traits;
 extern crate msg;
-extern crate util;
 
 extern crate libc;
 
 #[cfg(target_os="macos")]
 #[link_args="-Xlinker -undefined -Xlinker dynamic_lookup"]
 extern { }
 
 #[cfg(target_os="macos")]
--- a/servo/ports/cef/window.rs
+++ b/servo/ports/cef/window.rs
@@ -22,25 +22,25 @@ use compositing::compositor_thread::{sel
 use compositing::windowing::{WindowEvent, WindowMethods};
 use euclid::point::Point2D;
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::{Size2D, TypedSize2D};
 use gfx_traits::DevicePixel;
 use gleam::gl;
 use msg::constellation_msg::{Key, KeyModifiers};
 use net_traits::net_error_list::NetError;
+use servo_geometry::ScreenPx;
 use std::cell::RefCell;
 use std::ffi::CString;
 use std::os::raw::{c_char, c_void};
 use std::ptr;
 use std::rc::Rc;
 use std::sync::mpsc::{Sender, channel};
 use servo_url::ServoUrl;
 use style_traits::cursor::Cursor;
-use util::geometry::ScreenPx;
 #[cfg(target_os="linux")]
 extern crate x11;
 #[cfg(target_os="linux")]
 use self::x11::xlib::{XInitThreads,XOpenDisplay};
 
 #[cfg(target_os="linux")]
 pub static mut DISPLAY: *mut c_void = 0 as *mut c_void;
 
--- a/servo/ports/glutin/Cargo.toml
+++ b/servo/ports/glutin/Cargo.toml
@@ -14,19 +14,20 @@ compositing = {path = "../../components/
 euclid = "0.10.1"
 gfx_traits = {path = "../../components/gfx_traits"}
 gleam = "0.2.8"
 log = "0.3.5"
 msg = {path = "../../components/msg"}
 net_traits = {path = "../../components/net_traits"}
 script_traits = {path = "../../components/script_traits"}
 servo-glutin = "0.6"
+servo_geometry = {path = "../../components/geometry"}
+servo_config = {path = "../../components/config"}
 servo_url = {path = "../../components/url"}
 style_traits = {path = "../../components/style_traits"}
-util = {path = "../../components/util"}
 
 [target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
 osmesa-sys = "0.1.2"
 
 [target.'cfg(target_os = "linux")'.dependencies]
 x11 = "2.0.0"
 
 [target.'cfg(target_os = "android")'.dependencies]
--- a/servo/ports/glutin/lib.rs
+++ b/servo/ports/glutin/lib.rs
@@ -14,26 +14,27 @@ extern crate euclid;
 extern crate gfx_traits;
 extern crate gleam;
 extern crate glutin;
 #[macro_use] extern crate log;
 extern crate msg;
 extern crate net_traits;
 #[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys;
 extern crate script_traits;
+extern crate servo_config;
+extern crate servo_geometry;
 extern crate servo_url;
 extern crate style_traits;
-extern crate util;
 #[cfg(target_os = "windows")] extern crate winapi;
 #[cfg(target_os = "windows")] extern crate user32;
 #[cfg(target_os = "windows")] extern crate gdi32;
 
 use compositing::windowing::WindowEvent;
+use servo_config::opts;
 use std::rc::Rc;
-use util::opts;
 use window::Window;
 
 pub mod window;
 
 pub type WindowID = glutin::WindowID;
 
 pub trait NestedEventLoopListener {
     fn handle_event_from_nested_event_loop(&mut self, event: WindowEvent) -> bool;
--- a/servo/ports/glutin/window.rs
+++ b/servo/ports/glutin/window.rs
@@ -21,33 +21,33 @@ use glutin::{ScanCode, TouchPhase};
 #[cfg(target_os = "macos")]
 use glutin::os::macos::{ActivationPolicy, WindowBuilderExt};
 use msg::constellation_msg::{self, Key};
 use msg::constellation_msg::{ALT, CONTROL, KeyState, NONE, SHIFT, SUPER};
 use net_traits::net_error_list::NetError;
 #[cfg(any(target_os = "linux", target_os = "macos"))]
 use osmesa_sys;
 use script_traits::{TouchEventType, TouchpadPressurePhase};
+use servo_config::opts;
+use servo_config::prefs::PREFS;
+use servo_config::resource_files;
+use servo_geometry::ScreenPx;
 use servo_url::ServoUrl;
 use std::cell::{Cell, RefCell};
 #[cfg(any(target_os = "linux", target_os = "macos"))]
 use std::ffi::CString;
 #[cfg(any(target_os = "linux", target_os = "macos"))]
 use std::mem;
 use std::os::raw::c_void;
 use std::ptr;
 use std::rc::Rc;
 use std::sync::mpsc::{Sender, channel};
 use style_traits::cursor::Cursor;
 #[cfg(target_os = "windows")]
 use user32;
-use util::geometry::ScreenPx;
-use util::opts;
-use util::prefs::PREFS;
-use util::resource_files;
 #[cfg(target_os = "windows")]
 use winapi;
 
 static mut G_NESTED_EVENT_LOOP_LISTENER: Option<*mut (NestedEventLoopListener + 'static)> = None;
 
 bitflags! {
     flags KeyModifiers: u8 {
         const LEFT_CONTROL = 1,
--- a/servo/ports/servo/Cargo.toml
+++ b/servo/ports/servo/Cargo.toml
@@ -17,18 +17,19 @@ bench = false
 compiletest_helper = {path = "../../tests/compiletest/helper"}
 gfx_tests = {path = "../../tests/unit/gfx"}
 layout_tests = {path = "../../tests/unit/layout"}
 net_tests = {path = "../../tests/unit/net"}
 net_traits_tests = {path = "../../tests/unit/net_traits"}
 plugin_compiletest = {path = "../../tests/compiletest/plugin"}
 profile_tests = {path = "../../tests/unit/profile"}
 script_tests = {path = "../../tests/unit/script"}
+servo_config_tests = {path = "../../tests/unit/servo_config"}
+servo_remutex_tests = {path = "../../tests/unit/servo_remutex"}
 style_tests = {path = "../../tests/unit/style"}
-util_tests = {path = "../../tests/unit/util"}
 
 [features]
 default = ["webdriver", "max_log_level"]
 max_log_level = ["log/release_max_level_info"]
 webdriver = ["libservo/webdriver_server"]
 energy-profiling = ["libservo/energy-profiling"]
 testing = ["libservo/testing"]
 clippy = ["libservo/clippy"]
--- a/servo/ports/servo/main.rs
+++ b/servo/ports/servo/main.rs
@@ -33,18 +33,18 @@ extern crate log;
 extern crate servo;
 #[cfg(not(target_os = "android"))]
 #[macro_use]
 extern crate sig;
 
 use backtrace::Backtrace;
 use servo::Browser;
 use servo::compositing::windowing::WindowEvent;
-use servo::util::opts::{self, ArgumentParsingResult};
-use servo::util::servo_version;
+use servo::config::opts::{self, ArgumentParsingResult};
+use servo::config::servo_version;
 use std::env;
 use std::panic;
 use std::process;
 use std::rc::Rc;
 use std::thread;
 
 pub mod platform {
     #[cfg(target_os = "macos")]
@@ -281,28 +281,28 @@ mod android {
     struct FilePtr(*mut self::libc::FILE);
 
     unsafe impl Send for FilePtr {}
 
     fn redirect_output(file_no: c_int) {
         use self::libc::{pipe, dup2};
         use self::libc::fdopen;
         use self::libc::fgets;
-        use servo::util::thread::spawn_named;
         use std::ffi::CStr;
         use std::ffi::CString;
         use std::str::from_utf8;
+        use std::thread;
 
         unsafe {
             let mut pipes: [c_int; 2] = [ 0, 0 ];
             pipe(pipes.as_mut_ptr());
             dup2(pipes[1], file_no);
             let mode = CString::new("r").unwrap();
             let input_file = FilePtr(fdopen(pipes[0], mode.as_ptr()));
-            spawn_named("android-logger".to_owned(), move || {
+            thread::Builder::new().name("android-logger".to_owned()).spawn(move || {
                 static READ_SIZE: usize = 1024;
                 let mut read_buffer = vec![0; READ_SIZE];
                 let FilePtr(input_file) = input_file;
                 loop {
                     fgets(read_buffer.as_mut_ptr(), (read_buffer.len() as i32)-1, input_file);
                     let c_str = CStr::from_ptr(read_buffer.as_ptr());
                     let slice = from_utf8(c_str.to_bytes()).unwrap();
                     android_glue::write_log(slice);
--- a/servo/tests/unit/net/Cargo.toml
+++ b/servo/tests/unit/net/Cargo.toml
@@ -17,13 +17,13 @@ flate2 = "0.2.0"
 hyper = "0.9.9"
 hyper_serde = "0.1.4"
 ipc-channel = "0.5"
 msg = {path = "../../../components/msg"}
 net = {path = "../../../components/net"}
 net_traits = {path = "../../../components/net_traits"}
 plugins = {path = "../../../components/plugins"}
 profile_traits = {path = "../../../components/profile_traits"}
+servo_config = {path = "../../../components/config"}
 time = "0.1"
 unicase = "1.0"
 url = {version = "1.2", features = ["heap_size"]}
 servo_url = {path = "../../../components/url"}
-util = {path = "../../../components/util"}
--- a/servo/tests/unit/net/fetch.rs
+++ b/servo/tests/unit/net/fetch.rs
@@ -20,27 +20,27 @@ use hyper::server::{Request as HyperRequ
 use hyper::status::StatusCode;
 use hyper::uri::RequestUri;
 use msg::constellation_msg::TEST_PIPELINE_ID;
 use net::fetch::cors_cache::CorsCache;
 use net::fetch::methods::{fetch, fetch_with_cors_cache};
 use net_traits::ReferrerPolicy;
 use net_traits::request::{Origin, RedirectMode, Referrer, Request, RequestMode};
 use net_traits::response::{CacheState, Response, ResponseBody, ResponseType};
+use servo_config::resource_files::resources_dir_path;
 use servo_url::ServoUrl;
 use std::fs::File;
 use std::io::Read;
 use std::rc::Rc;
 use std::sync::{Arc, Mutex};
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::mpsc::{Sender, channel};
 use time::{self, Duration};
 use unicase::UniCase;
 use url::Origin as UrlOrigin;
-use util::resource_files::resources_dir_path;
 
 // TODO write a struct that impls Handler for storing test values
 
 #[test]
 fn test_fetch_response_is_not_network_error() {
     static MESSAGE: &'static [u8] = b"";
     let handler = move |_: HyperRequest, response: HyperResponse| {
         response.send(MESSAGE).unwrap();
--- a/servo/tests/unit/net/lib.rs
+++ b/servo/tests/unit/net/lib.rs
@@ -11,21 +11,21 @@ extern crate devtools_traits;
 extern crate flate2;
 extern crate hyper;
 extern crate hyper_serde;
 extern crate ipc_channel;
 extern crate msg;
 extern crate net;
 extern crate net_traits;
 extern crate profile_traits;
+extern crate servo_config;
 extern crate servo_url;
 extern crate time;
 extern crate unicase;
 extern crate url;
-extern crate util;
 
 #[cfg(test)] mod chrome_loader;
 #[cfg(test)] mod cookie;
 #[cfg(test)] mod cookie_http_state;
 #[cfg(test)] mod data_loader;
 #[cfg(test)] mod file_loader;
 #[cfg(test)] mod fetch;
 #[cfg(test)] mod mime_classifier;
new file mode 100644
--- /dev/null
+++ b/servo/tests/unit/servo_config/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "servo_config_tests"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+
+[lib]
+name = "servo_config_tests"
+path = "lib.rs"
+doctest = false
+
+[dependencies]
+servo_config = {path = "../../../components/config"}
+
rename from servo/tests/unit/util/lib.rs
rename to servo/tests/unit/servo_config/lib.rs
--- a/servo/tests/unit/util/lib.rs
+++ b/servo/tests/unit/servo_config/lib.rs
@@ -1,12 +1,10 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #![cfg(test)]
 
-extern crate util;
+extern crate servo_config;
 
 mod opts;
 mod prefs;
-mod remutex;
-mod thread;
rename from servo/tests/unit/util/opts.rs
rename to servo/tests/unit/servo_config/opts.rs
--- a/servo/tests/unit/util/opts.rs
+++ b/servo/tests/unit/servo_config/opts.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+use servo_config::opts::parse_url_or_filename;
 use std::path::Path;
-use util::opts::parse_url_or_filename;
 
 #[cfg(not(target_os = "windows"))]
 const FAKE_CWD: &'static str = "/fake/cwd";
 
 #[cfg(target_os = "windows")]
 const FAKE_CWD: &'static str = "C:/fake/cwd";
 
 #[test]
rename from servo/tests/unit/util/prefs.rs
rename to servo/tests/unit/servo_config/prefs.rs
--- a/servo/tests/unit/util/prefs.rs
+++ b/servo/tests/unit/servo_config/prefs.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+use servo_config::basedir;
+use servo_config::prefs::{PREFS, PrefValue, read_prefs_from_file};
 use std::fs::{self, File};
 use std::io::{Read, Write};
-use util::basedir;
-use util::prefs::{PREFS, PrefValue, read_prefs_from_file};
 
 #[test]
 fn test_create_pref() {
     let json_str = "{\
   \"layout.writing-mode.enabled\": true,\
   \"network.mime.sniff\": false,\
   \"shell.homepage\": \"http://servo.org\"\
 }";
new file mode 100644
--- /dev/null
+++ b/servo/tests/unit/servo_remutex/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "servo_remutex_tests"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+
+[lib]
+name = "servo_remutex_tests"
+path = "lib.rs"
+doctest = false
+
+[dependencies]
+servo_remutex = {path = "../../../components/remutex"}
+
rename from servo/tests/unit/util/remutex.rs
rename to servo/tests/unit/servo_remutex/lib.rs
--- a/servo/tests/unit/util/remutex.rs
+++ b/servo/tests/unit/servo_remutex/lib.rs
@@ -5,20 +5,24 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 // These tests came from https://github.com/rust-lang/rust/blob/master/src/libstd/sys/common/remutex.rs
 
+#![cfg(test)]
+
+extern crate servo_remutex;
+
+use servo_remutex::{ReentrantMutex, ReentrantMutexGuard};
 use std::cell::RefCell;
 use std::sync::Arc;
 use std::thread;
-use util::remutex::{ReentrantMutex, ReentrantMutexGuard};
 
 #[test]
 fn smoke() {
     let m = ReentrantMutex::new(());
     {
         let a = m.lock().unwrap();
         {
             let b = m.lock().unwrap();
--- a/servo/tests/unit/style/Cargo.toml
+++ b/servo/tests/unit/style/Cargo.toml
@@ -18,12 +18,12 @@ cssparser = {version = "0.7", features =
 euclid = "0.10.1"
 matches = "0.1"
 owning_ref = "0.2.2"
 parking_lot = "0.3"
 rustc-serialize = "0.3"
 selectors = "0.15"
 html5ever-atoms = "0.1"
 servo_atoms = {path = "../../../components/atoms"}
+servo_config = {path = "../../../components/config"}
 style = {path = "../../../components/style"}
 style_traits = {path = "../../../components/style_traits"}
 servo_url = {path = "../../../components/url"}
-util = {path = "../../../components/util"}
--- a/servo/tests/unit/style/lib.rs
+++ b/servo/tests/unit/style/lib.rs
@@ -11,20 +11,20 @@ extern crate cssparser;
 extern crate euclid;
 #[macro_use] extern crate html5ever_atoms;
 #[macro_use] #[allow(unused_extern_crates)] extern crate matches;
 extern crate owning_ref;
 extern crate parking_lot;
 extern crate rustc_serialize;
 extern crate selectors;
 #[macro_use] extern crate servo_atoms;
+extern crate servo_config;
 extern crate servo_url;
 extern crate style;
 extern crate style_traits;
-extern crate util;
 
 mod atomic_refcell;
 mod attr;
 mod cache;
 mod logical_geometry;
 mod media_queries;
 mod owning_handle;
 mod parsing;
--- a/servo/tests/unit/style/viewport.rs
+++ b/servo/tests/unit/style/viewport.rs
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use cssparser::Parser;
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::TypedSize2D;
 use media_queries::CSSErrorReporterTest;
+use servo_config::prefs::{PREFS, PrefValue};
 use servo_url::ServoUrl;
 use style::error_reporting::ParseErrorReporter;
 use style::media_queries::{Device, MediaType};
 use style::parser::{ParserContext, ParserContextExtraData};
 use style::stylesheets::{Stylesheet, Origin};
 use style::values::specified::Length::{self, ViewportPercentage};
 use style::values::specified::LengthOrPercentageOrAuto::{self, Auto};
 use style::values::specified::ViewportPercentageLength::Vw;
@@ -30,18 +31,17 @@ macro_rules! stylesheet {
     }
 }
 
 fn test_viewport_rule<F>(css: &str,
                          device: &Device,
                          callback: F)
     where F: Fn(&Vec<ViewportDescriptorDeclaration>, &str)
 {
-    ::util::prefs::PREFS.set("layout.viewport.enabled",
-                             ::util::prefs::PrefValue::Boolean(true));
+    PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true));
     let stylesheet = stylesheet!(css, Author, Box::new(CSSErrorReporterTest));
     let mut rule_count = 0;
     stylesheet.effective_viewport_rules(&device, |rule| {
         rule_count += 1;
         callback(&rule.declarations, css);
     });
     assert!(rule_count > 0);
 }
@@ -245,18 +245,17 @@ fn cascading_within_viewport_rule() {
         assert_decl_len!(declarations == 2);
         assert_decl_eq!(&declarations[0], Author, MinWidth: ViewportLength::Specified(Auto), !important);
         assert_decl_eq!(&declarations[1], Author, MaxWidth: ViewportLength::Specified(Auto), !important);
     });
 }
 
 #[test]
 fn multiple_stylesheets_cascading() {
-    ::util::prefs::PREFS.set("layout.viewport.enabled",
-                             ::util::prefs::PrefValue::Boolean(true));
+    PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true));
     let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
     let error_reporter = CSSErrorReporterTest;
     let stylesheets = vec![
         stylesheet!("@viewport { min-width: 100px; min-height: 100px; zoom: 1; }", UserAgent, error_reporter.clone()),
         stylesheet!("@viewport { min-width: 200px; min-height: 200px; }", User, error_reporter.clone()),
         stylesheet!("@viewport { min-width: 300px; }", Author, error_reporter.clone())];
 
     let declarations = Cascade::from_stylesheets(&stylesheets, &device).finish();
deleted file mode 100644
--- a/servo/tests/unit/util/Cargo.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-[package]
-name = "util_tests"
-version = "0.0.1"
-authors = ["The Servo Project Developers"]
-license = "MPL-2.0"
-
-[lib]
-name = "util_tests"
-path = "lib.rs"
-doctest = false
-
-[dependencies]
-util = {path = "../../../components/util"}
-
deleted file mode 100644
--- a/servo/tests/unit/util/thread.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-use std::borrow::ToOwned;
-use util::thread::spawn_named;
-
-#[test]
-fn spawn_named_test() {
-    spawn_named("Test".to_owned(), move || {
-        println!("I can run!");
-    });
-}