Several updates/improvement and clean up for the issue #129