added support for tags in expanded style, pep8 fixed