Tidied up some of the main code
- replaced + with @ in the sed substitutions as VCS PKGBUILDs need +
- split replace|remove into seperate entries, for cleaner looking code
- added a few comments to help identify the regexes
- using Bash inbuilt string functions instead of calling 'tr'