remove unused code, conditionally add danger-zone class, and update positioning