mem&consts

Added free in destructors.
Changed const where possible.