Added dynamic object loader. TODO: make BasicEntity abstract