add license and organize a bit