made some functions and classes constant correct
refactored some of the type names
need to introduce grs compliant state representation?