Changed interface to be more automatic.