Added Vector class to simplify code