Added partial demo project and some bug fixes.