Update version strings for 1.4.0-beta4 release

Code refactoring