Finished nested loop, working on little issues with it.