Correct many GCC compiler errors (mainly template and typename errors, see this link: http://stackoverflow.com/questions/610245/where-and-why-do-i-have-to-put-the-template-and-typename-keywords/613132#613132 ). Add a missing include.