Cleaned up code

Autofinds homedir and hostname