Add vectorized method

Also cleaned up file