cleaned up the code for NetStation a bit