Removing Refinery and minor IO fix