some generalization, css cleanup, chaos -> order :)