Move wait_list and hooks into their own files.
Fix issues from blaze-layout integration test.