Refactorings: generic token handlers added
Extract declarative part of the code