Moved sfmap and sfgmap into tree.
Fixed analyze function to use new mapping