Added tests and some generic layout