updated coding style - and comments