Tidied up code

Tried to make method signatures consistently styled; added copyright
notice; added helper method to add columns.