fixed compiler errors, improved vector style