Increase shell compatibility
- replace source with . which is recognized by more shells
- replace function syntax with a more generic one
fix merge conflict