Initial commit

Based on an example by Daniel Beck