refactoring server ui to adapt to the mvc pattern
adapted to mvc, some refactoring
refactoring