fixed all warnings in code.