Major cleanup

string -> const string& where possible
getComponents/getEntities returns a vector&