やっと => Eventually... N4
と思っている => Plan to do something N4
Plan
ようと思う/ようと思っている => thinking of doing; planning to ~ N3
~かと思いきや => contrary to expectations; or so we thought, but ~ N1
Things do not match the prediction
かと思ったら/かと思うと => just when; no sooner than ~ N2
... にと思って => To do..., to let... N2
Purpose, target
と[思「おも」]いきや => Even though A (was thought/expected), different result B N1
Contrast/Surprise
…かと思ったら => just when; no sooner than ~ N2
Things do not match the prediction
てっきり...と思う => surely; certainly; without a doubt N3
と思う => I think N5
... やっと => at last; finally (Realizing what is expected) N3
Completed
のであった => So...(Exclamation) N2
Exclamatory