Whitespace & file permissions
Convert into out-of-tree module
Fixups to get build working with -Wall -Werror
big huge fat ugly commit