Cleaned up the codes.