adding calls to cleanup function, completing token storage function