Major modifications throughout