My theory on the ending.
**SPOILZORS ARMED AND READY. DECIDE ON YOUR COURSE OF ACTION, YOU HAVE 30 SECONDS TO COMPLY**
Essentially, Niamh discovers about halfway through the movie that it is her that is causing things to move and kill people. She then becomes fully cognizant of her powers and learns to control them (nothing paranormal happens without her knowledge after she confesses that "it's me" to her counselor).
She doesn't really know what to do until she goes to the "doll party." There she essentially witnesses that all human beings are inherently abusive, as the young ladies mistreat the baby dolls.
After that she decides that the safest place for children is to be forever removed from their parents. So she kills them all. In her mind, it was a mercy killing.
After that, she decides that the safest place for her is also dead. She brings along her foster parents to "try out" their point of view, washing them and dressing them and assuring them that they will be ok. She then kills everyone, including her two "acolytes", Peter and Emily.