Streamline code, fix default token generator