Made the code look more pretty and follow C Style Guidelines.