Indentation and warnings fixed.