Change attributes in memory

* Fixed few typo
* A minor change while checking the sibling in is_sibling_of()
* Change few attributes in memory after move and add_child operation. Earlier these were being changed in db but were not being changed in memory.