add license; cleanup and organize code in repo