Refinery now works, but needs to be tweaked