Remove never thrown AccessDeniedException;
remove some unused code