Finished HOPAccount implementation. Fixed some bugs on states handling