Fix code layout, fix tags support