Removed unused debug and misc cleanup