Added Comments, lisence, Just generally made code prettier.