Introduced pretty print and fixed sometings