Replace vectors and some inline functions