Reverting previous commits

These should be reviewed on a separate branch first.