code clean up on admin views