Made various fixes and improved implementation of multiple methods.

Added proper destructor methods.
Fixed various bugs within cases and comparers.
Added support for soft/hard type comparison.
Fixed/moved case grammar definitions.
Added a general framework for memory cases.