general refectorings and simple install script