added some tests, reworked file layout