Refarctored vertices/indices code to not need new every frame