Tidied up code and fixed abaqus constants