Correct code and initialize properly variables escpecially arrays. Also do fixes and simplificate to make it more readble