Javascript Model based on promises with plugins support