More comlex queries added.
Look for ToDo's in comments.