Fixed bugs with API.  Removed XML code