re-arranged function definitions and added prototypes for mlfbq functions