Cleaned and beautified my code : ]