Adding more manipulation code and tests