Code re-organized and fixed the setup.py script to take proper hostname