Updated code according to conventions