All code simplified