Code structure simplified