Removed debug statements, fixed auto refresh issue