Reorganize entire program

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>