Some code that's not really that great but is at least a start.