Added a lot of diagnostic methods