Added parser testing code, debugging commences, fixed one initialisation bug