Split engine.cs, and added networking