Formating some code and fixed the draw rectangle from debug