So many changes.
Merged version