A Theory of the Universe