Extracted examples to their own file. Added test for the double example.