Debug and finish up