Correcting your global vars, and add in a base path one