Made code more efficient

Pieces take in fewer attributes