Added solution file and inserted more comments in code