fixed, cleaned and improved init script