code cleanup, remove unused stuff