Fix warning: remove extra semi-column.
Fix type conversion warnings.
Fix no-return warning.
Fix warning: remove unused function.