Ported items and blocks from trees module to scala representation.