reorder initial routines by utilizing init hooks

Fixes #47

Signed-off-by: Jim Huang <jserv@0xlab.org>