Coding standards fix, and casting inputs to public methods to prevent type errors.