Cleans output before building ES