Initial checkin of basic thumbnailing core