Code cleanup on tomato plant and a few tweaks