License and some cleanup