Major modifications here and there