Fixed some warnings; added debug info