Various Changes and tests