Some refactoring. Moving variables to defaults instead of vars.
Added hostname configuration.