Move all user-interface related code to new class UserInterface

Also make userBalance static