Vaje 3 and quick code cleanup.