Finished render code and some core gameobject functions