Reorganize and implement end-game