Initial working version
Resolved conflicts