Refactored some functions and removed vector_split