Fixed a defect in tab segue. The wrong logic was used when handling the tab number in the end of the identifier.
Simplified replace segue. It now works without needing to specified the identifier of the final segue.