Solved all warnings in the code