Removed global variables. Code refactoring.

Added string len constant. Default server path will from
now on always contain publish folder.