Added new adapter, fixed some bugs