Add hierarchical tests
fix warnings