Breakdown elastic.h

Brokedown elastic.h to smaller header files
cleanup

removed causes of compiler warning,
optimise matrix output and matlab generation
header cleanup

-removed unused headers
- other cleanups
debug off