fixed error handling so i can start to work on the state calc implementation
added state calculator (fluid flow not yet implemented)