cleaned up image app code