some refacteroring and ui fragments