Changed structure of the document; rewrote introduction.