added a lot of styles and a bit of refactoring
some refactoring not commited last time