Cleaned up category optimization scripts