add tests, add some styles, get rid off json, clean up the code a bit