MAJOR REVISION. Working version.