Updated and reworked parts according to the prvious comments.