Code clean: make implementation simpler