Added a thumbnail command. Also some other minor fixes