Split up library/ files.

The `library/` directory was getting pretty funky, so I've split the files up in different logical directories. The directories `geometry`, `input`, `util`, `graphics`, `net`, and `zone` were added.