bug fixes
linitian checks
Less bash, more perl, propably much more resources and lots faster