Refactor wallet class