Improved install script and fixed some warnings.