Added two functions for using entity components conveniently.