extract math classes into separate library
updated to latest cornerstone library
fixed a bug with imageIdSpecificStateManagement