clean up a bit, break out wake source determination