Implemented trash equation logic and redesigned add equation logic