Refactoring How MainActivity handles fragments

Still have a bug where tab fragments are created twice.
Fixed some fragment restoration issues.