Update API
Cleanup and HMM