Added license. Removed unnessesary code.