diff --git a/extra/crypto/common/authors.txt b/basis/hexdump/authors.txt
old mode 100755
new mode 100644
similarity index 100%
rename from extra/crypto/common/authors.txt
rename to basis/hexdump/authors.txt
diff --git a/basis/hexdump/hexdump-docs.factor b/basis/hexdump/hexdump-docs.factor
new file mode 100644
index 0000000000..a83f64e8db
--- /dev/null
+++ b/basis/hexdump/hexdump-docs.factor
@@ -0,0 +1,22 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel ;
+IN: hexdump
+
+HELP: hexdump.
+{ $values { "sequence" "a sequence" } }
+{ $description "Converts a sequence to its hexadecimal and ASCII representation sixteen characters at a time and writes it to standard out." } ;
+
+HELP: hexdump
+{ $values { "sequence" "a sequence" } { "string" "a string" } }
+{ $description "Converts a sequence to its hexadecimal and ASCII representation sixteen characters at a time.  Lines are separated by a newline character." }
+{ $see-also hexdump. } ;
+
+ARTICLE: "hexdump" "Hexdump"
+"The " { $vocab-link "hexdump" } " vocabulary provides a traditional hexdump view of a sequence." $nl
+"Write hexdump to string:"
+{ $subsection hexdump }
+"Write the hexdump to the output stream:"
+{ $subsection hexdump. } ;
+
+ABOUT: "hexdump"
diff --git a/extra/hexdump/hexdump-tests.factor b/basis/hexdump/hexdump-tests.factor
similarity index 100%
rename from extra/hexdump/hexdump-tests.factor
rename to basis/hexdump/hexdump-tests.factor
diff --git a/extra/hexdump/hexdump.factor b/basis/hexdump/hexdump.factor
similarity index 67%
rename from extra/hexdump/hexdump.factor
rename to basis/hexdump/hexdump.factor
index f444f5a4f2..618ed00802 100644
--- a/extra/hexdump/hexdump.factor
+++ b/basis/hexdump/hexdump.factor
@@ -1,5 +1,8 @@
-USING: arrays io io.streams.string kernel math math.parser namespaces
-prettyprint sequences sequences.lib splitting grouping strings ascii ;
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: arrays io io.streams.string kernel math math.parser
+namespaces prettyprint sequences splitting grouping strings
+ascii ;
 IN: hexdump
 
 <PRIVATE
@@ -21,11 +24,12 @@ IN: hexdump
     nl ;
 
 PRIVATE>
-: hexdump ( seq -- str )
+
+: hexdump ( sequence -- string )
     [
         dup length header.
         16 <sliced-groups> [ line. ] each-index
     ] with-string-writer ;
 
-: hexdump. ( seq -- )
+: hexdump. ( sequence -- )
     hexdump write ;
diff --git a/extra/hexdump/summary.txt b/basis/hexdump/summary.txt
similarity index 100%
rename from extra/hexdump/summary.txt
rename to basis/hexdump/summary.txt
diff --git a/extra/crypto/barrett/barrett-tests.factor b/extra/crypto/barrett/barrett-tests.factor
index be52240372..01163f730f 100644
--- a/extra/crypto/barrett/barrett-tests.factor
+++ b/extra/crypto/barrett/barrett-tests.factor
@@ -1,4 +1,7 @@
+! Copyright (C) 2008 DoDoug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
 USING: crypto.barrett kernel math namespaces tools.test ;
+IN: crypto.barrett.tests
 
 [ HEX: 1f63edfb7e838622c7412eafaf0439cf0cdf3aae8bdd09e2de69b509a53883a83560d5ce50ea039e4 ] [  HEX: 827c67f31b2b46afa49ed95d7f7a3011e5875f7052d4c55437ce726d3c6ce0dc9c445fda63b6dc4e 16 barrett-mu ] unit-test
 
diff --git a/extra/crypto/barrett/barrett.factor b/extra/crypto/barrett/barrett.factor
index 4a070190e3..25e67d01ce 100644
--- a/extra/crypto/barrett/barrett.factor
+++ b/extra/crypto/barrett/barrett.factor
@@ -1,14 +1,12 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math math.functions ;
 IN: crypto.barrett
 
 : barrett-mu ( n size -- mu )
     #! Calculates Barrett's reduction parameter mu
     #! size = word size in bits (8, 16, 32, 64, ...)
-    ! over log2 1+ over / 2 * >r 2 swap ^ r> ^ swap / floor ;
-    [
-        [ log2 1+ ] [ / 2 * ] bi*
-    ] [
-        2^ rot ^ swap /i
-    ] 2bi ;
+    [ [ log2 1+ ] [ / 2 * ] bi* ]
+    [ 2^ rot ^ swap /i ] 2bi ;
 
 
diff --git a/extra/crypto/common/common.factor b/extra/crypto/common/common.factor
deleted file mode 100644
index 61cc11f959..0000000000
--- a/extra/crypto/common/common.factor
+++ /dev/null
@@ -1,17 +0,0 @@
-USING: arrays kernel io io.binary sbufs splitting grouping
-strings sequences namespaces math math.parser parser
-hints math.bitwise assocs ;
-IN: crypto.common
-
-: (nth-int) ( string n -- int )
-    2 shift dup 4 + rot <slice> ; inline
-    
-: nth-int ( string n -- int ) (nth-int) le> ; inline
-    
-: update ( num var -- ) [ w+ ] change ; inline
-
-SYMBOL: big-endian?
-
-: mod-nth ( n seq -- elt )
-    #! 5 "abcd" -> b
-    [ length mod ] [ nth ] bi ;
diff --git a/extra/crypto/hmac/hmac.factor b/extra/crypto/hmac/hmac.factor
index 6e30f19775..d98e8a9798 100755
--- a/extra/crypto/hmac/hmac.factor
+++ b/extra/crypto/hmac/hmac.factor
@@ -1,4 +1,4 @@
-USING: arrays combinators crypto.common checksums checksums.md5
+USING: arrays combinators checksums checksums.md5
 checksums.sha1 checksums.md5.private io io.binary io.files
 io.streams.byte-array kernel math math.vectors memoize sequences
 io.encodings.binary ;
diff --git a/extra/crypto/random.factor b/extra/crypto/random.factor
deleted file mode 100755
index f2d3b0555a..0000000000
--- a/extra/crypto/random.factor
+++ /dev/null
@@ -1,40 +0,0 @@
-USING: kernel math math-contrib sequences namespaces errors
-hashtables words arrays parser compiler syntax io ;
-IN: crypto
-: make-bits ( quot numbits -- n | quot: -- 0/1 )
-    0 -rot [ drop dup call rot 1 shift bitor swap ] each drop ;
-
-: random-bytes ( m -- n )
-    >r [ 2 random ] r> 8 * make-bits ;
-
-! DEFER: random-bits
-: add-bit ( bit integer -- integer ) 1 shift bitor ;
-: append-bits ( inta intb nbits -- int ) swapd shift bitor ;
-: large-random-bits ( n -- int )
-    #! random number with high bit and low bit enabled (odd)
-    2 swap ^ [ random ] keep -1 shift 1 bitor bitor ;
-! : next-double ( -- f ) 53 random-bits 9007199254740992 /f ;
-
-: 0count ( integer -- n ) 0 swap [ 0 = [ 1+ ] when ] each-bit ;
-: 1count ( integer -- n ) 0 swap [ 1 = [ 1+ ] when ] each-bit ;
-
-: bit-reverse-table
-{
-    HEX: 00 HEX: 80 HEX: 40 HEX: C0 HEX: 20 HEX: A0 HEX: 60 HEX: E0 HEX: 10 HEX: 90 HEX: 50 HEX: D0 HEX: 30 HEX: B0 HEX: 70 HEX: F0 
-    HEX: 08 HEX: 88 HEX: 48 HEX: C8 HEX: 28 HEX: A8 HEX: 68 HEX: E8 HEX: 18 HEX: 98 HEX: 58 HEX: D8 HEX: 38 HEX: B8 HEX: 78 HEX: F8 
-    HEX: 04 HEX: 84 HEX: 44 HEX: C4 HEX: 24 HEX: A4 HEX: 64 HEX: E4 HEX: 14 HEX: 94 HEX: 54 HEX: D4 HEX: 34 HEX: B4 HEX: 74 HEX: F4 
-    HEX: 0C HEX: 8C HEX: 4C HEX: CC HEX: 2C HEX: AC HEX: 6C HEX: EC HEX: 1C HEX: 9C HEX: 5C HEX: DC HEX: 3C HEX: BC HEX: 7C HEX: FC 
-    HEX: 02 HEX: 82 HEX: 42 HEX: C2 HEX: 22 HEX: A2 HEX: 62 HEX: E2 HEX: 12 HEX: 92 HEX: 52 HEX: D2 HEX: 32 HEX: B2 HEX: 72 HEX: F2 
-    HEX: 0A HEX: 8A HEX: 4A HEX: CA HEX: 2A HEX: AA HEX: 6A HEX: EA HEX: 1A HEX: 9A HEX: 5A HEX: DA HEX: 3A HEX: BA HEX: 7A HEX: FA
-    HEX: 06 HEX: 86 HEX: 46 HEX: C6 HEX: 26 HEX: A6 HEX: 66 HEX: E6 HEX: 16 HEX: 96 HEX: 56 HEX: D6 HEX: 36 HEX: B6 HEX: 76 HEX: F6 
-    HEX: 0E HEX: 8E HEX: 4E HEX: CE HEX: 2E HEX: AE HEX: 6E HEX: EE HEX: 1E HEX: 9E HEX: 5E HEX: DE HEX: 3E HEX: BE HEX: 7E HEX: FE
-    HEX: 01 HEX: 81 HEX: 41 HEX: C1 HEX: 21 HEX: A1 HEX: 61 HEX: E1 HEX: 11 HEX: 91 HEX: 51 HEX: D1 HEX: 31 HEX: B1 HEX: 71 HEX: F1
-    HEX: 09 HEX: 89 HEX: 49 HEX: C9 HEX: 29 HEX: A9 HEX: 69 HEX: E9 HEX: 19 HEX: 99 HEX: 59 HEX: D9 HEX: 39 HEX: B9 HEX: 79 HEX: F9 
-    HEX: 05 HEX: 85 HEX: 45 HEX: C5 HEX: 25 HEX: A5 HEX: 65 HEX: E5 HEX: 15 HEX: 95 HEX: 55 HEX: D5 HEX: 35 HEX: B5 HEX: 75 HEX: F5
-    HEX: 0D HEX: 8D HEX: 4D HEX: CD HEX: 2D HEX: AD HEX: 6D HEX: ED HEX: 1D HEX: 9D HEX: 5D HEX: DD HEX: 3D HEX: BD HEX: 7D HEX: FD
-    HEX: 03 HEX: 83 HEX: 43 HEX: C3 HEX: 23 HEX: A3 HEX: 63 HEX: E3 HEX: 13 HEX: 93 HEX: 53 HEX: D3 HEX: 33 HEX: B3 HEX: 73 HEX: F3 
-    HEX: 0B HEX: 8B HEX: 4B HEX: CB HEX: 2B HEX: AB HEX: 6B HEX: EB HEX: 1B HEX: 9B HEX: 5B HEX: DB HEX: 3B HEX: BB HEX: 7B HEX: FB
-    HEX: 07 HEX: 87 HEX: 47 HEX: C7 HEX: 27 HEX: A7 HEX: 67 HEX: E7 HEX: 17 HEX: 97 HEX: 57 HEX: D7 HEX: 37 HEX: B7 HEX: 77 HEX: F7 
-    HEX: 0F HEX: 8F HEX: 4F HEX: CF HEX: 2F HEX: AF HEX: 6F HEX: EF HEX: 1F HEX: 9F HEX: 5F HEX: DF HEX: 3F HEX: BF HEX: 7F HEX: FF
-} ; inline
-
diff --git a/extra/crypto/rsa/rsa-tests.factor b/extra/crypto/rsa/rsa-tests.factor
index 7de6bed76f..03aca0578b 100644
--- a/extra/crypto/rsa/rsa-tests.factor
+++ b/extra/crypto/rsa/rsa-tests.factor
@@ -1,4 +1,5 @@
 USING: kernel math namespaces crypto.rsa tools.test ;
+IN: crypto.rsa.tests
 
 [ 123456789 ] [ 128 generate-rsa-keypair 123456789 over rsa-encrypt swap rsa-decrypt ] unit-test
 [ 123456789 ] [ 129 generate-rsa-keypair 123456789 over rsa-encrypt swap rsa-decrypt ] unit-test
diff --git a/extra/crypto/rsa/rsa.factor b/extra/crypto/rsa/rsa.factor
index 5d3228db10..b1eb907547 100644
--- a/extra/crypto/rsa/rsa.factor
+++ b/extra/crypto/rsa/rsa.factor
@@ -1,3 +1,5 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
 USING: math.miller-rabin kernel math math.functions namespaces
 sequences accessors ;
 IN: crypto.rsa
diff --git a/extra/crypto/summary.txt b/extra/crypto/summary.txt
index edd7c44333..0421c07ca0 100644
--- a/extra/crypto/summary.txt
+++ b/extra/crypto/summary.txt
@@ -1 +1 @@
-Cryptographic algorithms implemented in Factor, such as MD5 and SHA1
+HMAC, XOR, Barrett, RSA, Timing
diff --git a/extra/crypto/xor/xor-tests.factor b/extra/crypto/xor/xor-tests.factor
index ef781b9f25..f3a13e086f 100644
--- a/extra/crypto/xor/xor-tests.factor
+++ b/extra/crypto/xor/xor-tests.factor
@@ -2,23 +2,24 @@ USING: continuations crypto.xor kernel strings tools.test ;
 IN: crypto.xor.tests
 
 ! No key
-[ ""        dup  xor-crypt           ] [ T{ no-xor-key f } = ] must-fail-with
-[ { }       dup  xor-crypt           ] [ T{ no-xor-key f } = ] must-fail-with
-[ V{ }      dup  xor-crypt           ] [ T{ no-xor-key f } = ] must-fail-with
-[ "" "asdf" dupd xor-crypt xor-crypt ] [ T{ no-xor-key f } = ] must-fail-with
+[ ""        dup  xor-crypt           ] [ T{ empty-xor-key } = ] must-fail-with
+[ { }       dup  xor-crypt           ] [ T{ empty-xor-key } = ] must-fail-with
+[ V{ }      dup  xor-crypt           ] [ T{ empty-xor-key } = ] must-fail-with
+[ "" "asdf" dupd xor-crypt xor-crypt ] [ T{ empty-xor-key } = ] must-fail-with
 
 ! a xor a = 0
 [ "\0\0\0\0\0\0\0" ] [ "abcdefg" dup xor-crypt ] unit-test
 
 [ { 15 15 15 15 } ] [ { 10 10 10 10 } { 5 5 5 5 } xor-crypt ] unit-test
 
-[ "asdf" ] [ "key" "asdf" dupd xor-crypt xor-crypt >string ] unit-test
-[ "" ] [ "key" "" xor-crypt >string ] unit-test
+[ "asdf" ] [ "asdf" "key" [ xor-crypt ] [ xor-crypt ] bi >string ] unit-test
+[ "" ] [ "" "key" xor-crypt >string ] unit-test
 [ "a longer message...!" ] [
-    "."
-    "a longer message...!" dupd xor-crypt xor-crypt >string
+    "a longer message...!" 
+    "." [ xor-crypt ] [ xor-crypt ] bi >string
 ] unit-test
 [ "a longer message...!" ] [
+    "a longer message...!"
     "a very long key, longer than the message even."
-    "a longer message...!" dupd xor-crypt xor-crypt >string
+    [ xor-crypt ] [ xor-crypt ] bi >string
 ] unit-test
diff --git a/extra/crypto/xor/xor.factor b/extra/crypto/xor/xor.factor
index 247387ebdf..6e3a605f5c 100644
--- a/extra/crypto/xor/xor.factor
+++ b/extra/crypto/xor/xor.factor
@@ -1,8 +1,12 @@
-USING: crypto.common kernel math sequences ;
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel math sequences fry ;
 IN: crypto.xor
 
-ERROR: no-xor-key ;
+: mod-nth ( n seq -- elt ) [ length mod ] [ nth ] bi ;
 
-: xor-crypt ( key seq -- seq' )
-    over empty? [ no-xor-key ] when
-    dup length rot [ mod-nth bitxor ] curry 2map ;
+ERROR: empty-xor-key ;
+
+: xor-crypt ( seq key -- seq' )
+    dup empty? [ empty-xor-key ] when
+    [ dup length ] dip '[ _ mod-nth bitxor ] 2map ;
diff --git a/extra/descriptive/descriptive.factor b/extra/descriptive/descriptive.factor
index 4b40747e9f..d02983d7fd 100755
--- a/extra/descriptive/descriptive.factor
+++ b/extra/descriptive/descriptive.factor
@@ -1,4 +1,4 @@
-USING: words kernel sequences combinators.lib locals
+USING: words kernel sequences locals
 locals.private accessors parser namespaces continuations
 summary definitions generalizations arrays ;
 IN: descriptive
diff --git a/extra/faq/faq.factor b/extra/faq/faq.factor
index 1ab348e434..c0636c5fd7 100644
--- a/extra/faq/faq.factor
+++ b/extra/faq/faq.factor
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: xml kernel sequences xml.utilities combinators.lib
-math xml.data arrays assocs xml.generator xml.writer namespaces
+USING: xml kernel sequences xml.utilities math xml.data
+arrays assocs xml.generator xml.writer namespaces
 make math.parser io accessors ;
 IN: faq
 
diff --git a/extra/hexdump/authors.txt b/extra/hexdump/authors.txt
deleted file mode 100644
index 7c1b2f2279..0000000000
--- a/extra/hexdump/authors.txt
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/hexdump/hexdump-docs.factor b/extra/hexdump/hexdump-docs.factor
deleted file mode 100644
index adf31d3787..0000000000
--- a/extra/hexdump/hexdump-docs.factor
+++ /dev/null
@@ -1,12 +0,0 @@
-USING: help.markup help.syntax kernel ;
-IN: hexdump
-
-HELP: hexdump.
-{ $values { "seq" "a sequence" } }
-{ $description "Converts a sequence to its hexadecimal and ASCII representation sixteen characters at a time and writes it to standard out." } ;
-
-HELP: hexdump
-{ $values { "seq" "a sequence" } { "str" "a string" } }
-{ $description "Converts a sequence to its hexadecimal and ASCII representation sixteen characters at a time.  Lines are separated by a newline character." }
-{ $see-also hexdump. } ;
-
diff --git a/extra/io/paths/paths.factor b/extra/io/paths/paths.factor
index fb4f6d3a6d..58b3518edd 100755
--- a/extra/io/paths/paths.factor
+++ b/extra/io/paths/paths.factor
@@ -1,14 +1,16 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
 USING: io.files kernel sequences accessors
-dlists deques arrays sequences.lib ;
+dlists deques arrays ;
 IN: io.paths
 
 TUPLE: directory-iterator path bfs queue ;
 
 : qualified-directory ( path -- seq )
-    dup directory [ first2 >r append-path r> 2array ] with map ;
+    dup directory [ first2 [ append-path ] dip 2array ] with map ;
 
 : push-directory ( path iter -- )
-    >r qualified-directory r> [
+    [ qualified-directory ] dip [
         dup queue>> swap bfs>>
         [ push-front ] [ push-back ] if
     ] curry each ;
@@ -24,27 +26,24 @@ TUPLE: directory-iterator path bfs queue ;
     ] if ;
 
 : iterate-directory ( iter quot -- obj )
-    2dup >r >r >r next-file dup [
-        r> call dup [
-            r> r> 2drop
-        ] [
-            drop r> r> iterate-directory
-        ] if
+    over next-file [
+        over call
+        [ 2drop ] [ iterate-directory ] if
     ] [
-        drop r> r> r> 3drop f
-    ] if ; inline
+        2drop f
+    ] if* ; inline recursive
 
 : find-file ( path bfs? quot -- path/f )
-    >r <directory-iterator> r>
+    [ <directory-iterator> ] dip
     [ keep and ] curry iterate-directory ; inline
 
 : each-file ( path bfs? quot -- )
-    >r <directory-iterator> r>
+    [ <directory-iterator> ] dip
     [ f ] compose iterate-directory drop ; inline
 
 : find-all-files ( path bfs? quot -- paths )
-    >r <directory-iterator> r>
-    pusher >r [ f ] compose iterate-directory drop r> ; inline
+    [ <directory-iterator> ] dip
+    pusher [ [ f ] compose iterate-directory drop ] dip ; inline
 
 : recursive-directory ( path bfs? -- paths )
-    [ ] accumulator >r each-file r> ;
+    [ ] accumulator [ each-file ] dip ;
diff --git a/extra/lisp/lisp.factor b/extra/lisp/lisp.factor
index 2866e63c69..e60529caab 100644
--- a/extra/lisp/lisp.factor
+++ b/extra/lisp/lisp.factor
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 James Cash
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel peg sequences arrays strings combinators.lib
+USING: kernel peg sequences arrays strings 
 namespaces combinators math locals locals.private locals.backend accessors
-vectors syntax lisp.parser assocs parser sequences.lib words
+vectors syntax lisp.parser assocs parser words
 quotations fry lists summary combinators.short-circuit continuations multiline ;
 IN: lisp
 
@@ -180,4 +180,4 @@ M: no-such-var summary drop "No such variable" ;
 
 : <LISP 
     "LISP>" parse-multiline-string define-lisp-builtins
-    lisp-string>factor parsed \ call parsed ; parsing
\ No newline at end of file
+    lisp-string>factor parsed \ call parsed ; parsing
diff --git a/extra/lisp/parser/parser.factor b/extra/lisp/parser/parser.factor
index 1b14f5bb34..72344fd0dc 100644
--- a/extra/lisp/parser/parser.factor
+++ b/extra/lisp/parser/parser.factor
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 James Cash
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel peg peg.ebnf math.parser sequences arrays strings
-combinators.lib math fry accessors lists combinators.short-circuit ;
+math fry accessors lists combinators.short-circuit ;
 
 IN: lisp.parser
 
@@ -36,4 +36,4 @@ atom         = number
               | string
 s-expression = LPAREN (list-item)* RPAREN                => [[ second seq>cons ]]
 list-item    = _ ( atom | s-expression ) _               => [[ second ]]
-;EBNF
\ No newline at end of file
+;EBNF
diff --git a/extra/money/money.factor b/extra/money/money.factor
index 76bc2bae18..5fa76d5f53 100644
--- a/extra/money/money.factor
+++ b/extra/money/money.factor
@@ -1,6 +1,6 @@
 USING: io kernel math math.functions math.parser parser lexer
 namespaces make sequences splitting grouping combinators
-continuations sequences.lib ;
+continuations ;
 IN: money
 
 : dollars/cents ( dollars -- dollars cents )
diff --git a/extra/parser-combinators/regexp/regexp.factor b/extra/parser-combinators/regexp/regexp.factor
index 40d4603fb6..b13321d991 100755
--- a/extra/parser-combinators/regexp/regexp.factor
+++ b/extra/parser-combinators/regexp/regexp.factor
@@ -1,6 +1,6 @@
 USING: arrays combinators kernel lists math math.parser
 namespaces parser lexer parser-combinators parser-combinators.simple
-promises quotations sequences combinators.lib strings math.order
+promises quotations sequences strings math.order
 assocs prettyprint.backend memoize unicode.case unicode.categories
 combinators.short-circuit accessors make io ;
 IN: parser-combinators.regexp
diff --git a/extra/project-euler/014/014.factor b/extra/project-euler/014/014.factor
index fcbc956de8..dc0c060b22 100644
--- a/extra/project-euler/014/014.factor
+++ b/extra/project-euler/014/014.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2007 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators.lib combinators.short-circuit kernel
+USING: arrays combinators.short-circuit kernel
 math math.ranges namespaces make sequences sorting ;
 IN: project-euler.014
 
diff --git a/extra/project-euler/017/017.factor b/extra/project-euler/017/017.factor
index cf58e88ffe..5f6541873a 100644
--- a/extra/project-euler/017/017.factor
+++ b/extra/project-euler/017/017.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2007 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.ranges math.text.english sequences sequences.lib strings
+USING: kernel math.ranges math.text.english sequences strings
     ascii combinators.short-circuit ;
 IN: project-euler.017
 
diff --git a/extra/project-euler/019/019.factor b/extra/project-euler/019/019.factor
index b29495f913..9482b337bb 100644
--- a/extra/project-euler/019/019.factor
+++ b/extra/project-euler/019/019.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2007 Samuel Tardieu, Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: calendar combinators kernel math math.ranges namespaces sequences
-    sequences.lib math.order ;
+    math.order ;
 IN: project-euler.019
 
 ! http://projecteuler.net/index.php?section=problems&id=19
@@ -32,7 +32,7 @@ IN: project-euler.019
 
 : euler019 ( -- answer )
     1901 2000 [a,b] [
-        12 [1,b] [ 1 zeller-congruence ] map-with
+        12 [1,b] [ 1 zeller-congruence ] with map
     ] map concat [ zero? ] count ;
 
 ! [ euler019 ] 100 ave-time
diff --git a/extra/project-euler/021/021.factor b/extra/project-euler/021/021.factor
index 9ae5f6af10..af6bb3270b 100644
--- a/extra/project-euler/021/021.factor
+++ b/extra/project-euler/021/021.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2007 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib combinators.short-circuit kernel math math.functions
-    math.ranges namespaces project-euler.common sequences sequences.lib ;
+USING: combinators.short-circuit kernel math math.functions
+    math.ranges namespaces project-euler.common sequences ;
 IN: project-euler.021
 
 ! http://projecteuler.net/index.php?section=problems&id=21
diff --git a/extra/project-euler/022/022.factor b/extra/project-euler/022/022.factor
index 82054ce014..a508ddea6c 100644
--- a/extra/project-euler/022/022.factor
+++ b/extra/project-euler/022/022.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2007 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: ascii io.encodings.ascii io.files kernel math project-euler.common
-    sequences sequences.lib sorting splitting ;
+    sequences sorting splitting ;
 IN: project-euler.022
 
 ! http://projecteuler.net/index.php?section=problems&id=22
diff --git a/extra/project-euler/030/030.factor b/extra/project-euler/030/030.factor
index 53d6b199fb..250494c0dc 100644
--- a/extra/project-euler/030/030.factor
+++ b/extra/project-euler/030/030.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions project-euler.common sequences sequences.lib ;
+USING: kernel math math.functions project-euler.common sequences ;
 IN: project-euler.030
 
 ! http://projecteuler.net/index.php?section=problems&id=30
diff --git a/extra/project-euler/032/032.factor b/extra/project-euler/032/032.factor
index 8a54c595a9..f9667c75fe 100755
--- a/extra/project-euler/032/032.factor
+++ b/extra/project-euler/032/032.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib hashtables kernel math math.combinatorics math.functions
+USING: hashtables kernel math math.combinatorics math.functions
     math.parser math.ranges project-euler.common sequences sets ;
 IN: project-euler.032
 
diff --git a/extra/project-euler/034/034.factor b/extra/project-euler/034/034.factor
index cf73ee828b..28c4fa5dc7 100644
--- a/extra/project-euler/034/034.factor
+++ b/extra/project-euler/034/034.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.ranges project-euler.common sequences sequences.lib ;
+USING: kernel math.ranges project-euler.common sequences ;
 IN: project-euler.034
 
 ! http://projecteuler.net/index.php?section=problems&id=34
diff --git a/extra/project-euler/035/035.factor b/extra/project-euler/035/035.factor
index cec9bc6957..8e8b654d28 100755
--- a/extra/project-euler/035/035.factor
+++ b/extra/project-euler/035/035.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel math math.combinatorics math.parser math.primes
-    project-euler.common sequences sequences.lib sets ;
+    project-euler.common sequences sets ;
 IN: project-euler.035
 
 ! http://projecteuler.net/index.php?section=problems&id=35
diff --git a/extra/project-euler/036/036.factor b/extra/project-euler/036/036.factor
index f3a9f738bf..fc9df9a8fe 100644
--- a/extra/project-euler/036/036.factor
+++ b/extra/project-euler/036/036.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib combinators.short-circuit kernel math.parser math.ranges
+USING: combinators.short-circuit kernel math.parser math.ranges
     project-euler.common sequences ;
 IN: project-euler.036
 
diff --git a/extra/project-euler/039/039.factor b/extra/project-euler/039/039.factor
index 7a9f51f1d3..d0caa6d0e4 100755
--- a/extra/project-euler/039/039.factor
+++ b/extra/project-euler/039/039.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators.lib kernel math math.ranges
+USING: arrays kernel math math.ranges
     namespaces project-euler.common sequences ;
 IN: project-euler.039
 
diff --git a/extra/project-euler/042/042.factor b/extra/project-euler/042/042.factor
index da26e34927..8ae95d6db7 100644
--- a/extra/project-euler/042/042.factor
+++ b/extra/project-euler/042/042.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: ascii io.files kernel math math.functions namespaces make
-    project-euler.common sequences sequences.lib splitting io.encodings.ascii ;
+    project-euler.common sequences splitting io.encodings.ascii ;
 IN: project-euler.042
 
 ! http://projecteuler.net/index.php?section=problems&id=42
diff --git a/extra/project-euler/043/043.factor b/extra/project-euler/043/043.factor
index a2f4ad5c61..84ed7a830f 100644
--- a/extra/project-euler/043/043.factor
+++ b/extra/project-euler/043/043.factor
@@ -1,8 +1,8 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib combinators.short-circuit hashtables kernel math
+USING: combinators.short-circuit hashtables kernel math
     math.combinatorics math.parser math.ranges project-euler.common sequences
-    sequences.lib sorting sets ;
+    sorting sets ;
 IN: project-euler.043
 
 ! http://projecteuler.net/index.php?section=problems&id=43
diff --git a/extra/project-euler/047/047.factor b/extra/project-euler/047/047.factor
index e59ca56f39..87a1387887 100644
--- a/extra/project-euler/047/047.factor
+++ b/extra/project-euler/047/047.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators.lib kernel math math.primes math.primes.factors
+USING: arrays kernel math math.primes math.primes.factors
     math.ranges namespaces sequences ;
 IN: project-euler.047
 
diff --git a/extra/project-euler/052/052.factor b/extra/project-euler/052/052.factor
index aec8015f94..3f562baa85 100644
--- a/extra/project-euler/052/052.factor
+++ b/extra/project-euler/052/052.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.lib combinators.short-circuit kernel math
+USING: combinators.short-circuit kernel math
     project-euler.common sequences sorting ;
 IN: project-euler.052
 
diff --git a/extra/project-euler/055/055.factor b/extra/project-euler/055/055.factor
index 289f3a002a..bf1dd43b97 100644
--- a/extra/project-euler/055/055.factor
+++ b/extra/project-euler/055/055.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.parser project-euler.common sequences sequences.lib ;
+USING: kernel math math.parser project-euler.common sequences ;
 IN: project-euler.055
 
 ! http://projecteuler.net/index.php?section=problems&id=55
@@ -49,8 +49,8 @@ IN: project-euler.055
 
 : (lychrel?) ( n iteration -- ? )
     dup 50 < [
-        >r add-reverse dup palindrome?
-        [ r> 2drop f ] [ r> 1+ (lychrel?) ] if
+        [ add-reverse ] dip over palindrome?
+        [ 2drop f ] [ 1+ (lychrel?) ] if
     ] [
         2drop t
     ] if ;
diff --git a/extra/project-euler/059/059.factor b/extra/project-euler/059/059.factor
index f209b50a46..e3ab9762d8 100644
--- a/extra/project-euler/059/059.factor
+++ b/extra/project-euler/059/059.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2008 Aaron Schaefer, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays ascii assocs hashtables io.encodings.ascii io.files kernel math
-    math.parser namespaces make sequences sequences.lib sequences.private sorting
+    math.parser namespaces make sequences sequences.private sorting
     splitting grouping strings sets accessors ;
 IN: project-euler.059
 
diff --git a/extra/project-euler/075/075.factor b/extra/project-euler/075/075.factor
index 8e5b849de5..76f2a2a26e 100755
--- a/extra/project-euler/075/075.factor
+++ b/extra/project-euler/075/075.factor
@@ -1,7 +1,7 @@
 ! Copyright (c) 2008 Aaron Schaefer.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays combinators.lib kernel math math.ranges
-    namespaces project-euler.common sequences sequences.lib ;
+USING: arrays kernel math math.ranges
+    namespaces project-euler.common sequences ;
 IN: project-euler.075
 
 ! http://projecteuler.net/index.php?section=problems&id=75
diff --git a/extra/project-euler/116/116.factor b/extra/project-euler/116/116.factor
index 5e2059ad9a..0e3633dc9a 100644
--- a/extra/project-euler/116/116.factor
+++ b/extra/project-euler/116/116.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Eric Mertens.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.ranges sequences sequences.lib ;
+USING: kernel math math.ranges sequences ;
 IN: project-euler.116
 
 ! http://projecteuler.net/index.php?section=problems&id=116
diff --git a/extra/project-euler/148/148.factor b/extra/project-euler/148/148.factor
index 49fd9a4895..0509936e52 100644
--- a/extra/project-euler/148/148.factor
+++ b/extra/project-euler/148/148.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Eric Mertens.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.functions sequences sequences.lib ;
+USING: kernel math math.functions sequences ;
 IN: project-euler.148
 
 ! http://projecteuler.net/index.php?section=problems&id=148
diff --git a/extra/project-euler/151/151.factor b/extra/project-euler/151/151.factor
index b64ae3d49f..7913cf9540 100644
--- a/extra/project-euler/151/151.factor
+++ b/extra/project-euler/151/151.factor
@@ -1,7 +1,6 @@
 ! Copyright (c) 2008 Eric Mertens.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs combinators kernel math math.order namespaces sequences
-    sequences.lib ;
+USING: assocs combinators kernel math math.order namespaces sequences ;
 IN: project-euler.151
 
 ! http://projecteuler.net/index.php?section=problems&id=151
diff --git a/extra/project-euler/186/186.factor b/extra/project-euler/186/186.factor
index 5308662daf..7504e09a81 100644
--- a/extra/project-euler/186/186.factor
+++ b/extra/project-euler/186/186.factor
@@ -1,5 +1,5 @@
 USING: circular disjoint-sets kernel math math.ranges
-       sequences sequences.lib ;
+sequences ;
 IN: project-euler.186
 
 : (generator) ( k -- n )
diff --git a/extra/project-euler/190/190.factor b/extra/project-euler/190/190.factor
index 35b9344362..c0b7cb577f 100644
--- a/extra/project-euler/190/190.factor
+++ b/extra/project-euler/190/190.factor
@@ -1,6 +1,6 @@
 ! Copyright (c) 2008 Eric Mertens.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences sequences.lib math math.functions math.ranges locals ;
+USING: kernel sequences math math.functions math.ranges locals ;
 IN: project-euler.190
 
 ! http://projecteuler.net/index.php?section=problems&id=190
diff --git a/extra/taxes/usa/federal/federal.factor b/extra/taxes/usa/federal/federal.factor
new file mode 100644
index 0000000000..b71b831ca6
--- /dev/null
+++ b/extra/taxes/usa/federal/federal.factor
@@ -0,0 +1,59 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays assocs kernel math math.intervals
+namespaces sequences money math.order taxes.usa.fica
+taxes.usa.medicare taxes.usa taxes.usa.w4 ;
+IN: taxes.usa.federal
+
+! http://www.irs.gov/pub/irs-pdf/p15.pdf
+! Table 7 ANNUAL Payroll Period 
+
+: federal-single ( -- triples )
+    {
+        {      0   2650 DECIMAL: 0   }
+        {   2650  10300 DECIMAL: .10 }
+        {  10300  33960 DECIMAL: .15 }
+        {  33960  79725 DECIMAL: .25 }
+        {  79725 166500 DECIMAL: .28 }
+        { 166500 359650 DECIMAL: .33 }
+        { 359650   1/0. DECIMAL: .35 }
+    } ;
+
+: federal-married ( -- triples )
+    {
+        {      0   8000 DECIMAL: 0   }
+        {   8000  23550 DECIMAL: .10 }
+        {  23550  72150 DECIMAL: .15 }
+        {  72150 137850 DECIMAL: .25 }
+        { 137850 207700 DECIMAL: .28 }
+        { 207700 365100 DECIMAL: .33 }
+        { 365100   1/0. DECIMAL: .35 }
+    } ;
+
+SINGLETON: federal
+: <federal> ( -- obj )
+    federal federal-single federal-married <tax-table> ;
+
+: federal-tax ( salary w4 tax-table -- n )
+    [ adjust-allowances ] 2keep marriage-table tax ;
+
+M: federal adjust-allowances* ( salary w4 collector entity -- newsalary )
+    2drop calculate-w4-allowances - ;
+
+M: federal withholding* ( salary w4 tax-table entity -- x )
+    drop
+    [ federal-tax ] 3keep drop
+    [ fica-tax ] 2keep
+    medicare-tax + + ;
+
+: total-withholding ( salary w4 tax-table -- x )
+    dup entity>> dup federal = [
+        withholding* 
+    ] [
+        drop
+        [ drop <federal> federal withholding* ]
+        [ dup entity>> withholding* ] 3bi +
+    ] if ;
+
+: net ( salary w4 collector -- x )
+    >r dupd r> total-withholding - ;
diff --git a/extra/taxes/usa/fica/fica.factor b/extra/taxes/usa/fica/fica.factor
new file mode 100644
index 0000000000..c1e85b75b4
--- /dev/null
+++ b/extra/taxes/usa/fica/fica.factor
@@ -0,0 +1,17 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors assocs.lib math math.order money ;
+IN: taxes.usa.fica
+
+: fica-tax-rate ( -- x ) DECIMAL: .062 ; inline
+
+ERROR: fica-base-unknown year ;
+
+: fica-base-rate ( year -- x )
+    H{
+        { 2008 102000 }
+        { 2007  97500 }
+    } [ fica-base-unknown ] unless-at ;
+
+: fica-tax ( salary w4 -- x )
+    year>> fica-base-rate min fica-tax-rate * ;
diff --git a/extra/taxes/usa/futa/futa.factor b/extra/taxes/usa/futa/futa.factor
new file mode 100644
index 0000000000..7368aef825
--- /dev/null
+++ b/extra/taxes/usa/futa/futa.factor
@@ -0,0 +1,15 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays assocs kernel math math.intervals
+namespaces sequences money math.order ;
+IN: taxes.usa.futa
+
+! Employer tax only, not withheld
+: futa-tax-rate ( -- x ) DECIMAL: .062 ; inline
+: futa-base-rate ( -- x ) 7000 ; inline
+: futa-tax-offset-credit ( -- x ) DECIMAL: .054 ; inline
+
+: futa-tax ( salary w4 -- x )
+    drop futa-base-rate min
+    futa-tax-rate futa-tax-offset-credit -
+    * ;
diff --git a/extra/taxes/usa/medicare/medicare.factor b/extra/taxes/usa/medicare/medicare.factor
new file mode 100644
index 0000000000..ea95224456
--- /dev/null
+++ b/extra/taxes/usa/medicare/medicare.factor
@@ -0,0 +1,8 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel math money ;
+IN: taxes.usa.medicare
+
+! No base rate for medicare; all wages subject
+: medicare-tax-rate ( -- x ) DECIMAL: .0145 ; inline
+: medicare-tax ( salary w4 -- x ) drop medicare-tax-rate * ;
diff --git a/extra/taxes/usa/mn/mn.factor b/extra/taxes/usa/mn/mn.factor
new file mode 100644
index 0000000000..8bb629efcd
--- /dev/null
+++ b/extra/taxes/usa/mn/mn.factor
@@ -0,0 +1,33 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays assocs kernel math math.intervals
+namespaces sequences money math.order usa-cities
+taxes.usa taxes.usa.w4 ;
+IN: taxes.usa.mn
+
+! Minnesota
+: mn-single ( -- triples )
+    {
+        {     0  1950  DECIMAL: 0     }
+        {  1950 23750  DECIMAL: .0535 }
+        { 23750 73540  DECIMAL: .0705 }
+        { 73540 1/0.   DECIMAL: .0785 }
+    } ;
+
+: mn-married ( -- triples )
+    {
+        {      0   7400 DECIMAL: 0     }
+        {   7400  39260 DECIMAL: .0535 }
+        {  39260 133980 DECIMAL: .0705 }
+        { 133980   1/0. DECIMAL: .0785 }
+    } ;
+
+: <mn> ( -- obj )
+    MN mn-single mn-married <tax-table> ;
+
+M: MN adjust-allowances* ( salary w4 collector entity -- newsalary )
+    2drop calculate-w4-allowances - ;
+
+M: MN withholding* ( salary w4 collector entity -- x )
+    drop
+    [ adjust-allowances ] 2keep marriage-table tax ;
diff --git a/unmaintained/taxes/taxes-tests.factor b/extra/taxes/usa/usa-tests.factor
similarity index 56%
rename from unmaintained/taxes/taxes-tests.factor
rename to extra/taxes/usa/usa-tests.factor
index 17d1998f67..a529762c81 100644
--- a/unmaintained/taxes/taxes-tests.factor
+++ b/extra/taxes/usa/usa-tests.factor
@@ -1,5 +1,7 @@
-USING: kernel money taxes tools.test ;
-IN: taxes.tests
+USING: kernel money tools.test
+taxes.usa taxes.usa.federal taxes.usa.mn
+taxes.utils taxes.usa.w4 usa-cities ;
+IN: taxes.usa.tests
 
 [
     426 23
@@ -42,14 +44,14 @@ IN: taxes.tests
 [
     780 81
 ] [
-    24000 2008 3 f <w4> <minnesota> net biweekly
+    24000 2008 3 f <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
 [
     818 76
 ] [
-    24000 2008 3 t <w4> <minnesota> net biweekly
+    24000 2008 3 t <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
@@ -57,14 +59,14 @@ IN: taxes.tests
 [
     2124 39
 ] [
-    78250 2008 3 f <w4> <minnesota> net biweekly
+    78250 2008 3 f <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
 [
     2321 76
 ] [
-    78250 2008 3 t <w4> <minnesota> net biweekly
+    78250 2008 3 t <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
@@ -72,45 +74,45 @@ IN: taxes.tests
 [
     2612 63
 ] [
-    100000 2008 3 f <w4> <minnesota> net biweekly
+    100000 2008 3 f <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
 [
     22244 52
 ] [
-    1000000 2008 3 f <w4> <minnesota> net biweekly
+    1000000 2008 3 f <w4> <mn> net biweekly
     dollars/cents
 ] unit-test
 
 [
     578357 40
 ] [
-    1000000 2008 3 f <w4> <minnesota> net
+    1000000 2008 3 f <w4> <mn> net
     dollars/cents
 ] unit-test
 
 [
     588325 41
 ] [
-    1000000 2008 3 t <w4> <minnesota> net
+    1000000 2008 3 t <w4> <mn> net
     dollars/cents
 ] unit-test
 
 
 [ 30 97 ] [
-    24000 2008 2 f <w4> <minnesota> withholding biweekly dollars/cents
+    24000 2008 2 f <w4> <mn> MN withholding* biweekly dollars/cents
 ] unit-test
 
 [ 173 66 ] [
-    78250 2008 2 f <w4> <minnesota> withholding biweekly dollars/cents
+    78250 2008 2 f <w4> <mn> MN withholding* biweekly dollars/cents
 ] unit-test
 
 
 [ 138 69 ] [
-    24000 2008 2 f <w4> <federal> withholding biweekly dollars/cents
+    24000 2008 2 f <w4> <federal> total-withholding biweekly dollars/cents
 ] unit-test
 
 [ 754 72 ] [
-    78250 2008 2 f <w4> <federal> withholding biweekly dollars/cents
+    78250 2008 2 f <w4> <federal> total-withholding biweekly dollars/cents
 ] unit-test
diff --git a/extra/taxes/usa/usa.factor b/extra/taxes/usa/usa.factor
new file mode 100644
index 0000000000..27ff4aef98
--- /dev/null
+++ b/extra/taxes/usa/usa.factor
@@ -0,0 +1,32 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors arrays assocs kernel math math.intervals
+namespaces sequences money math.order taxes.usa.w4 ;
+IN: taxes.usa
+
+! Withhold: FICA, Medicare, Federal (FICA is social security)
+
+TUPLE: tax-table entity single married ;
+C: <tax-table> tax-table
+
+GENERIC: adjust-allowances* ( salary w4 tax-table entity -- newsalary )
+GENERIC: withholding* ( salary w4 tax-table entity -- x )
+
+: adjust-allowances ( salary w4 tax-table -- newsalary )
+    dup entity>> adjust-allowances* ;
+
+: withholding ( salary w4 tax-table -- x )
+    dup entity>> withholding* ;
+
+: tax-bracket-range ( pair -- n ) first2 swap - ;
+
+: tax-bracket ( tax salary triples -- tax salary )
+    [ [ tax-bracket-range min ] keep third * + ] 2keep
+    tax-bracket-range [-] ;
+
+: tax ( salary triples -- x )
+    0 -rot [ tax-bracket ] each drop ;
+
+: marriage-table ( w4 tax-table -- triples )
+    swap married?>>
+    [ married>> ] [ single>> ] if ;
diff --git a/extra/taxes/usa/w4/w4.factor b/extra/taxes/usa/w4/w4.factor
new file mode 100644
index 0000000000..aad3773220
--- /dev/null
+++ b/extra/taxes/usa/w4/w4.factor
@@ -0,0 +1,13 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: accessors kernel math ;
+IN: taxes.usa.w4
+
+! Each employee fills out a w4
+TUPLE: w4 year allowances married? ;
+C: <w4> w4
+
+: allowance ( -- x ) 3500 ; inline
+
+: calculate-w4-allowances ( w4 -- x ) allowances>> allowance * ;
+
diff --git a/extra/taxes/utils/utils.factor b/extra/taxes/utils/utils.factor
new file mode 100644
index 0000000000..a5c2240625
--- /dev/null
+++ b/extra/taxes/utils/utils.factor
@@ -0,0 +1,10 @@
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: math ;
+IN: taxes.utils
+
+: monthly ( x -- y ) 12 / ;
+: semimonthly ( x -- y ) 24 / ;
+: biweekly ( x -- y ) 26 / ;
+: weekly ( x -- y ) 52 / ;
+: daily ( x -- y ) 360 / ;
diff --git a/unmaintained/taxes/authors.txt b/unmaintained/taxes/authors.txt
deleted file mode 100644
index 7c1b2f2279..0000000000
--- a/unmaintained/taxes/authors.txt
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/unmaintained/taxes/summary.txt b/unmaintained/taxes/summary.txt
deleted file mode 100644
index e983139ccb..0000000000
--- a/unmaintained/taxes/summary.txt
+++ /dev/null
@@ -1 +0,0 @@
-Calculate federal and state tax withholdings
diff --git a/unmaintained/taxes/tags.txt b/unmaintained/taxes/tags.txt
deleted file mode 100644
index 2964ef21b1..0000000000
--- a/unmaintained/taxes/tags.txt
+++ /dev/null
@@ -1 +0,0 @@
-taxes
diff --git a/unmaintained/taxes/taxes.factor b/unmaintained/taxes/taxes.factor
deleted file mode 100644
index 5e2a395c40..0000000000
--- a/unmaintained/taxes/taxes.factor
+++ /dev/null
@@ -1,145 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs kernel math math.intervals
-namespaces sequences combinators.lib money math.order ;
-IN: taxes
-
-: monthly ( x -- y ) 12 / ;
-: semimonthly ( x -- y ) 24 / ;
-: biweekly ( x -- y ) 26 / ;
-: weekly ( x -- y ) 52 / ;
-: daily ( x -- y ) 360 / ;
-
-! Each employee fills out a w4
-TUPLE: w4 year allowances married? ;
-C: <w4> w4
-
-: allowance ( -- x ) 3500 ; inline
-
-: calculate-w4-allowances ( w4 -- x ) allowances>> allowance * ;
-
-! Withhold: FICA, Medicare, Federal (FICA is social security)
-: fica-tax-rate ( -- x ) DECIMAL: .062 ; inline
-
-! Base rate -- income over this rate is not taxed
-ERROR: fica-base-unknown ;
-: fica-base-rate ( year -- x )
-    H{
-        { 2008 102000 }
-        { 2007  97500 }
-    } at* [ fica-base-unknown ] unless ;
-
-: fica-tax ( salary w4 -- x )
-    year>> fica-base-rate min fica-tax-rate * ;
-
-! Employer tax only, not withheld
-: futa-tax-rate ( -- x ) DECIMAL: .062 ; inline
-: futa-base-rate ( -- x ) 7000 ; inline
-: futa-tax-offset-credit ( -- x ) DECIMAL: .054 ; inline
-
-: futa-tax ( salary w4 -- x )
-    drop futa-base-rate min
-    futa-tax-rate futa-tax-offset-credit -
-    * ;
-
-! No base rate for medicare; all wages subject
-: medicare-tax-rate ( -- x ) DECIMAL: .0145 ; inline
-: medicare-tax ( salary w4 -- x ) drop medicare-tax-rate * ;
-
-MIXIN: collector
-GENERIC: adjust-allowances ( salary w4 collector -- newsalary )
-GENERIC: withholding ( salary w4 collector -- x )
-
-TUPLE: tax-table single married ;
-
-: <tax-table> ( single married class -- obj )
-    >r tax-table boa r> construct-delegate ;
-
-: tax-bracket-range ( pair -- n ) dup second swap first - ;
-
-: tax-bracket ( tax salary triples -- tax salary )
-    [ [ tax-bracket-range min ] keep third * + ] 2keep
-    tax-bracket-range [-] ;
-
-: tax ( salary triples -- x )
-    0 -rot [ tax-bracket ] each drop ;
-
-: marriage-table ( w4 tax-table -- triples )
-    swap married?>> [ married>> ] [ single>> ] if ;
-
-: federal-tax ( salary w4 tax-table -- n )
-    [ adjust-allowances ] 2keep marriage-table tax ;
-
-! http://www.irs.gov/pub/irs-pdf/p15.pdf
-! Table 7 ANNUAL Payroll Period 
-
-: federal-single ( -- triples )
-    {
-        {      0   2650 DECIMAL: 0   }
-        {   2650  10300 DECIMAL: .10 }
-        {  10300  33960 DECIMAL: .15 }
-        {  33960  79725 DECIMAL: .25 }
-        {  79725 166500 DECIMAL: .28 }
-        { 166500 359650 DECIMAL: .33 }
-        { 359650   1/0. DECIMAL: .35 }
-    } ;
-
-: federal-married ( -- triples )
-    {
-        {      0   8000 DECIMAL: 0   }
-        {   8000  23550 DECIMAL: .10 }
-        {  23550  72150 DECIMAL: .15 }
-        {  72150 137850 DECIMAL: .25 }
-        { 137850 207700 DECIMAL: .28 }
-        { 207700 365100 DECIMAL: .33 }
-        { 365100   1/0. DECIMAL: .35 }
-    } ;
-
-TUPLE: federal ;
-INSTANCE: federal collector
-: <federal> ( -- obj )
-    federal-single federal-married federal <tax-table> ;
-
-M: federal adjust-allowances ( salary w4 collector -- newsalary )
-    drop calculate-w4-allowances - ;
-
-M: federal withholding ( salary w4 tax-table -- x )
-    [ federal-tax ] 3keep drop
-    [ fica-tax ] 2keep
-    medicare-tax + + ;
-
-
-! Minnesota
-: minnesota-single ( -- triples )
-    {
-        {     0  1950  DECIMAL: 0     }
-        {  1950 23750  DECIMAL: .0535 }
-        { 23750 73540  DECIMAL: .0705 }
-        { 73540 1/0.   DECIMAL: .0785 }
-    } ;
-
-: minnesota-married ( -- triples )
-    {
-        {      0   7400 DECIMAL: 0     }
-        {   7400  39260 DECIMAL: .0535 }
-        {  39260 133980 DECIMAL: .0705 }
-        { 133980   1/0. DECIMAL: .0785 }
-    } ;
-
-TUPLE: minnesota ;
-INSTANCE: minnesota collector
-: <minnesota> ( -- obj )
-    minnesota-single minnesota-married minnesota <tax-table> ;
-
-M: minnesota adjust-allowances ( salary w4 collector -- newsalary )
-    drop calculate-w4-allowances - ;
-
-M: minnesota withholding ( salary w4 collector -- x )
-    [ adjust-allowances ] 2keep marriage-table tax ;
-
-: employer-withhold ( salary w4 collector -- x )
-    [ withholding ] 3keep
-    dup federal? [ 3drop ] [ drop <federal> withholding + ] if ;
-
-: net ( salary w4 collector -- x )
-    >r dupd r> employer-withhold - ;