Improve beacon drawing code.