Removing memoisation of type lookup and adding protocol reference to each field

In reference to #42
Adding special cases for EC2 protocol to ensure correct flattening of type fields

In reference to #42