Added data binding support and some bug fixes