Cleaned up plant code