found an even better way of doing it
Code:
sudo scutil --set ComputerName "newcompname"
sudo scutil --set LocalHostName "newhostname"
this is much smoother than editing the plist manually and does not require any restarts of any kind, the mac does it all for you.