Refactoring setting token type function for correct identifying and started to work on newObj creations.