Simplified input handling for lb_main.py

Thanks to a suggestion my dingo, I was able to reduce overhead in the input handling code.