Added changes to first working version.