Excuse the basic question but what language is that? And does anyone have a good tutorial or similar on writing things like this? I know this is basic stuff but I hadn't really seen a real example of a 'smart contact' (I assume that's what this is) until now and seeing it like this is intriguing.