Fixed stylistisc errors and reduced warnings.