License and code clean up