Fixed File IO and Some commenting