Improve code as too big for UNO