fix core lib bugs; finish image app