Reorganised and added gems for debugging