Cleaned up tweak code.