Clean some dead code and refactor user adapter