Changed interaction model according to API docs, added some validation, fixed bugs