fix erwanite down by Duke. Yes erwanite can be done by others :-)
refactoring gui and base