fixed complains about /etc/init.d/functions, added new hostname configuration scheme, fixed some whitespaces