Cleaning up logic gate drawing functions.