cleanup and rename pure to unit