Added constructor, inNetwork function, and fixed for 64-bit machines