Restored minor changes from original class