Net code almost working (at least I hope so :p)