Added GPL License header. Re-idented the code.