logically this is still a mess, extensive cleanup is order, but it will come after core features are implemented