removes warnings unused atribuites, and dead codes

remove warnings unused attributes, and dead codes