More work on vectors

Should be finished now, starting work on entities.