Fix styles

This update fix the warning of Checkstyle and remove unused variables and methods.