Added ResourceManager, fix some trap script