added daemon functionality
implemented thumbnailing