Added more comments. Added GPL declarations.