Add MIT license and do some clean up work with link.hpp