Minor changes ... refactoring mostly