Finalizes code for Flatland