Use short array and singleton.

Signed-off-by: crynobone <crynobone@gmail.com>