Truncate file names, and clear code panel after new plays. Also refactor toolbar layout code.