Debugged to remove various ... issues