Updated main.cs

Replaced main.cs with basic 2d3d functions. Create & Destroy functions,
creating viewpoint.