Added GPLv3 header to the code