Make vars local
Move sys info code to separate file