Updating code to beta4 by merging in from uFactory's download site.