move debugging code inside #ifs
remove unused debugging prints
reorganize code
create single method to get read and write methods
move making of generic reader/writer to an earlier phase
cleanup csproj files