Removed compile and runtime warnings.