Added some tests and restyle