add a sleep which fixes the startup issue
remove unused handler functions