Removed unused methods and fixed widget "loop" only when client is connected