cleanup & tests