Major improvements by JB
merge