another refactor. see long comment

now variables should be better parsed from user input, and better
organized. Functions should have no more hardcoded pieces of strings.
Functions order during initialization is changed and is more
intuitive. Noew we should be ready for a deeper unit testing
Merge pull request #9 from pioneerskies/vhostrc_flag

another refactor. see long comment