fix thumbnail issues + some cleanup