Fixed nested while loops and allows for description in custom code