Formatted code, added some instructions on the top.