Added GNU GPLv3 licence and corrected main.cpp warnings