Additional type checks in style writers
Type check in element writers
Refactor elements and containers