Con/destructors

Added constructors/half a destructor to the term class, and did some
work on the dynamic memory system (unfinished)