Change module structure, classes structure and other.
Change module structure, classes structure and other #2.
Fix tag writing.
Fix tag changing. Delete unused functions.
Some fixes.
Code refactoring.