added waitUnload as a test helper function
made headers a real class