Added layer management and updated gui