Add some types and removed some unnecessary parts