Code and GUI updated