Update 2: Small optical modifications and added some comments.