Cleaned up and fixed init script.