Fixed bug in boundary structure. Changed density statistics output