Make fragments independent from MainActivity and refactor fragment creation