updated with PSR-2 compliance
updated tag fetching and type tag processing
updated tests
rename methods and definitions