Initial code

This was an interview question. One thing I struggled with was naming
things properly. Should have a better naming convention next time.