some little refactoring and restyling