Added javascript method to get pieces by name so its not always searching through all the pieces