Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
['E>FE EFA B2 c d2 c/d/', 'def g2 f e2'  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
"^E dorian" z | E>FE EFA | B2 c d2 c/d/ | B>AF F>ED | E2 D B,3 |"^5" E>FE EFA | B2 c d2 c/d/ | 
 BAG FEF | E3- E2 :| d |"^9" edB def | g2 f e2 f | e>dB B>AF | E2 D B,2 d |1"^13" edB def | 
 g2 f e2 d | Beg f>e^d | e3 e2 :|2"^17" EFE EFA | B2 c d2 c/d/ | BAG FEF | E3- E3 |]  