API cleaning. Fixed #27.
Implemented XM amount