Rewrote FBModal to a better structure