I guess I had a friend staying overnight.
( I ( ( guess ( I ( had ( ( a friend ) ( staying overnight ) ) ) ) ) . ) )
(ROOT (S (NP (PRP I)) (VP (VBP guess) (SBAR (S (NP (PRP I)) (VP (VBD had) (NP (NP (DT a) (NN friend)) (VP (VBG staying) (ADVP (RB overnight)))))))) (. .)))
My friend had gone home before nighttime. 
( ( My friend ) ( ( had ( ( gone home ) ( before nighttime ) ) ) . ) )
(ROOT (S (NP (PRP$ My) (NN friend)) (VP (VBD had) (VP (VBN gone) (ADVP (RB home)) (PP (IN before) (NP (NN nighttime))))) (. .)))