cleanup server.pp
refactor