Refactored chip class