Added licensing information and fixed some compile exports