Added some nice APIs and tools