Corrected warnings and checkstyles issues