Main logic is finished, now to debug.