Moved init function to pieces.cpp