Renamed the files, fixed some bugs in pieces