changed frame names and added a debugging mode