Move vertex loader to single function