https://github.com/kyoken74/gwt-angular/issues/21 Cleaned up the code.