The kinematical phase space of classical gravitational field is flat (affine) and unbounded. Because of this, field variables may tend to infinity leading to appearance of singularities, which plague Einstein's theory of gravity. During the talk the idea of generalizing the theory of gravity by compactification of the phase space will be discussed. The procedure of compactification of the phase space of a minisuperspace gravitational model with two dimensional phase space will be introduced. The model will be analyzed at both classical and quantum level.