content hierarchy and some bug fixes