Finished the problem, fixed all bugs