Added 'removeAllTags' method, fixed related to that issue and made some tiny optimizations.