More work on gui handler