Rework in-game ui and improve code