Changed to using arrays rather than lists for the piece lists. This makes it about 30% quicker