many changes, nearly constructing layout from json