layout and a little bit js for reg