Made code work with external interfaces.