added refactor + license stuff
worked on example and fixed bugs