Bug fixes and added missing files.