slide code cleanup