ArrayList check attached to the X key

also, minor clean up