fixed all warnings. note that some patterns have not been fully implemented yet, but thats okay