Moved next block showing code to ui script.