Minor changes for more flexibility.