Move glue functions into one file
Add copy right headers
Add some documentation