Add license headers and fix code formatting - #1