Fixed refactoring issues (InternalsVisibleTo)