Refactored some code.
Added showcase for shadow based token usage
Fixed exception handling