Update to test logic, datalayer as storage adapter and better comments

Lots of small little tweaks here and there.