lot of bug fixes and more clean code and works for RedHat etc